官方首页 | 无图版 | BBS首页
PJBlog3 2.8.5.157 新版发布 下载|升级(2008.8.26) 来给PJ3提提发展建议 2008版 PJHOME 珍藏/纪念版官方T恤 正式发布! PJ3内测团队主创人员身份,性格,特点吐血大曝光
PJBlog技术支持论坛使用问题总索引 PJ-Blog 3 斑竹日志 【独家】我使用过的三种空间,与客服的精彩故事 Z-Blog,Wordpress,Bo-Blog转换到PJBlog
发新话题
打印

[制作求助] 导航栏整体居中应该怎么弄?

导航栏整体居中应该怎么弄?

在Skin的layout.css文件里面以下代码应该如何编写,才可以让导航栏在所有浏览器下都可以居中?
复制内容到剪贴板
代码:
#container #header #menu{height:33px;text-align:center;margin:0 auto;/*visibility:hidden;*/}
以下是我Blog:http://www.l-sky.cn/在FireFox下顶部导航栏是居左的……我无法调整使他居中,请大虾指教以下……拜托了……

以下是layout.css全文
复制内容到剪贴板
代码:
/*---主体样式---*/
#container{width:100%;margin:0 auto;text-align:center;}
  /*---顶部样式---*/
  #container #header{height:105px;margin:0 auto;background:url('header_bg.jpg') no-repeat;background-position:top center;}
  #container #header #blogname{height:80px;margin:0 auto;padding:0px 0px 0px 200px;font-size:23px;color:#484848;text-align:left;font-weight:bold;visibility:hidden;}
  #container #header #blogname #blogTitle{font-size:12px;margin:10px 3px 3px 0px;height:20px;color:#484848;visibility:hidden;}
  #container #header #menu{height:33px;text-align:center;margin:0 auto;/*visibility:hidden;*/}
  #container #header #menu #Left{width:0px;float:left;}
  #container #header #menu #Right{width:0px;float:right;}  
  #container #header #menu ul{width:818px;margin:-9px 0px 0px 0px;height:33px;background-position:top center;}
  #container #header #menu ul li{float:left;height:33px;}  
   .menuL{width:10px;background:#fff url('menu_left.jpg') no-repeat;padding:0px;}
   .menuR{width:10px;background:#fff url('menu_right.jpg') no-repeat;padding:0px;}  
   .menuDiv{width:2px;background:#fff url('menu_div.jpg') no-repeat;padding:0px;}/*---菜单分割线---*/
  /*---内容样式---*/
  #container #Tbody{width:65%;margin:0 auto;text-align:left;}
  /*---工具条--*/
  #sidebar{float:left;width:24%;margin:0 auto;text-align:center;color:#999;overflow:hidden;}
  #innersidebar{}
  #sidebar-topimg{height:0px;overflow:hidden;}
  #sidebar-bottomimg{height:0px;overflow:hidden;}
  /*---工具箱样式--*/
  .sidepanel{padding:0px 0px 0 0px;background: url('sidebarbg.jpg') repeat-y;}
  .Ptitle{height:26px;text-align:left;margin:0px;padding:15px 0px 0px 30px;font-weight:bold;font-size:12px;color:#fff;background:url('side_titlebg.jpg') center left repeat-y;}  
  .Pcontent{text-align:left;padding:4px 4px 0 15px;background: url('sidebarbg.jpg') repeat-y;}  
  .Pfoot{height:9px;background:url('sidebarbgbottom.jpg') repeat-y;}
  /*---主内容--*/
  #mainContent{float:right;text-align:left;width:100%;margin:0px -10px 0px -190px;padding-top:6px;overflow:hidden;}
  #innermainContent{margin:0px 18px 0px 190px;}
  #mainContent-topimg{height:0px;overflow:hidden;}
  #mainContent-bottomimg{height:0px;overflow:hidden;}
  .content-width{margin:auto;width:98%}/*--主内容元素的全局宽度--*/
  /*---主内容页数--*/
  .pageContent{margin:0 auto;padding-left:3px;text-align:left;height:18px;}
  .NavTitle{float:left;font-weight:bold;}
  .page{padding-right:5px;height:18px;}
  .page ul{list-style:none;margin:0px;padding:0px}
  .page ul li{float:left;padding:0px 3px 0px 3px;}
  .page ul li.PageL {width:9px;height:16px;}
  .page ul li.PageR {width:9px;height:16px;}
  .PageLbutton{background:url('../../images/BttnLeft.gif') 0px 0px;width:9px;height:16px;display:block;}
  .PageRbutton{background:url('../../images/BttnRight.gif') 0px 0px;width:9px;height:16px;display:block;}
  /*---内容框--*/
  .Content{margin:5px 0px 10px 16px;background:url('Contentbg.gif') no-repeat left top;}   
  /*---日志标题框--*/
  .Content-top{color:#fff;text-align:left;height: 25px!important;height: 21px;padding-right: 10px;padding-left: 10px;line-height: 160%;padding-top: 2px!important;padding-top: 4px;margin-top: 0px;}
  .Content-top .ContentLeft{width:0px;float:left;}
  .Content-top .ContentRight{width:0px;float:right;}
  .Content-top .ContentTitle{display:inline;font-size:12px;padding-left:16px;}
  .Content-top .ContentAuthor{color:#fff;font-size:12px!important;font-size:11px;padding-left:15px;margin:1px;font-weight:100;display:inline;}
  /*---日志内容框--*/
  .Content-body{margin:12px 8px 2px 12px;overflow:hidden;text-align:left;width:98%;line-height: 165%;color:#999;}
  /*---日志内容底部--*/
  .Content-bottom{text-align:right;height:20px;padding:3px 5px 1px 2px;margin-bottom:15px!important;margin-bottom:5px;color:#999;}
  .Content-bottom .ContentBLeft{width:0px;float:left;}
  .Content-bottom .ContentBRight{width:0px;float:right;}  

  /*---日志其他信息--*/
  .Content-Info {margin:0px;padding:5px 10px 6px 10px;}
  .Content-Info .InfoAuthor{text-align:left}
  .Content-Info .InfoOther{float:right;text-align:right;}
  /*--评论框--*/
  .comment{text-align:left;margin:0px 2px 15px 2px;background:#fff;border:1px solid #DEE9EF}
  .commentinfo{font-size:11px;color:#fff;}
  .commenttop{padding:4px;background:#DEE9EF;margin:1px}
  .commentcontent{padding:10px;line-height:140%;overflow:hidden;width:96%}
  /*---UBB框--*/
  .UBBPanel{BORDER-RIGHT: #cad9ea 1px solid; BORDER-TOP: #cad9ea 4px solid; FONT-SIZE: 12px; MARGIN: 5px 5px; OVERFLOW: hidden; BORDER-LEFT: #cad9ea 1px solid; BORDER-BOTTOM: #cad9ea 1px solid}
  .UBBPanel H5 {BORDER-RIGHT: #fff 1px solid; BORDER-TOP: #fff 1px solid; PADDING-LEFT: 5px; BORDER-LEFT: #fff 1px solid; COLOR: #666; LINE-HEIGHT: 20px; BORDER-BOTTOM: #cad9ea 1px solid}
  .UBBPanel EM {FONT-WEIGHT: normal; FONT-STYLE: normal;PADDING-RIGHT: 5px; PADDING-LEFT: 0px; FONT-SIZE: 12px; FLOAT: right; PADDING-BOTTOM: 0px; CURSOR: pointer; COLOR: #666; LINE-HEIGHT: 1em; PADDING-TOP: 8px}
  .UBBTitle{font-weight:bold;padding:4px;background:#DEE9EF;}
  .UBBContent{padding:6px;line-height:160%;}
  .UBBContent TEXTAREA {width:448px;margin-bottom:2px;}
  :link.UBBLink,:visited.UBBLink{font-size:11px;font-family:Arial;}
  /*---信息框--*/
  #MsgContent{border:1px solid #DEE9EF;width:460px;padding:1px;margin:auto;}
  #MsgContent #MsgHead{background:#DEE9EF;padding:4px;color:#fff;text-align:center;font-weight:bold;}
  #MsgContent #MsgBody{padding:1px;line-height:135%;}

  .LDialog{border:1px solid #DEE9EF;margin:3px auto;padding:1px;}
  .LDialog .LHead{background:#DEE9EF;padding:1px;color:#fff;text-align:center;font-weight:bold;}
  .LDialog .LBody{padding:4px;line-height:200%;}


/*信息框图标以及文字*/
   .MessageText{height:50px;margin-right:38px;}
   .MessageIcon{background:url('../../images/Message.gif') no-repeat;width:48px;height:48px;float:left;}
   .ErrorIcon{background:url('../../images/Error.gif') no-repeat;width:48px;height:48px;float:left;}
   .WarningIcon{background:url('../../images/Warning.gif') no-repeat;width:48px;height:48px;float:left;}   
   .QuestionIcon{background:url('../../images/Question.gif') no-repeat;width:48px;height:48px;float:left;}
  /*---底部样式---*/
  #container #foot{margin:0px;padding-top:2px;height:68px;color:#999;background:#fff url('footer_bg.jpg') repeat-x;background-position:center;}
  #container #foot p{margin:0px}
  /*---文件上传框样式---*/
  .attachmentBody{
  margin:0px;font-size:12px;background:#FFFFFF
  }
[ 本帖最后由 悠然白鹿 于 2008-8-8 17 编辑 ]
即使心再碎也不流泪……
http://www.l-sky.cn

TOP

#container #header{text-align:center;}
可以了吧

TOP

尝试添加了,可是还是不行,没有反映……
即使心再碎也不流泪……
http://www.l-sky.cn

TOP

我尝试使用margin:0 auto;
发现也没有反映,FF下到底应该怎么整呀?这个FF真讨厌……
即使心再碎也不流泪……
http://www.l-sky.cn

TOP

发新话题