PageAdmin网站内容管理系统(CMS)交流论坛

注册

 

QQ登录

只需一步,快速开始

发新话题 回复该主题

栏目少如何调到居中 [复制链接]

1#


由于栏目较少,所以没有显示居中,这个想给他调整到整个网页居中的地方应该调哪里?
分享 转发
TOP
2#

[b]回复 [url=http://bbs.pageadmin.net/showtopic-37846.aspx#141652]2楼[color=Olive]qq842330359[/color]的帖子[/url][/b]

谢谢,但是不知道是哪个代码
TOP
3#

找到style.css文件,在里面找到.menu_box ul,看看它里面的代码是怎么样的,如果里面有text-align:left或者right,修改为center,就是text-align:center;再找到.menu_box li,看看他里面是什么代码,如果有float:left或者right,就把他删了,添加displayne-block,你试试
TOP
4#

[b]回复 [url=http://bbs.pageadmin.net/showtopic-37846.aspx#141678]4楼[color=Olive]xiyou[/color]的帖子[/url][/b]

谢谢版主,回复中那个闪电是什么意思。
TOP
5#

  1. display:inline-block
复制代码
TOP
6#

@import url(/e/css/comm.css);
@import url(/e/css/focus.css);
@import url(home.css);

/*网站基础样式*/

html{-webkit-text-size-adjust:none;}
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,th,td,p,blockquote,hr,button,article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{margin:0px;padding:0px;}
article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block;}
audio,canvas,video{display:inline-block;*display: inline;*zoom:1;}
body{word-wrap:break-word;text-align:center;font:12px/1.8 Tahoma,Verdana,Arial,\5b8b\4f53;color333333;background:url(images/body_bg_1.jpg) repeat-x center 0;background-attachmentixed}

input,select,textarea,button{font-size:100%;}
table{border-collapse:collapse;border-spacing:0;}
img{border:0;}
li{list-style:none;*margin-left:-1px}
.left{float:left}
.right{float:right}
.clear{display:block;clear:both;font-size:0px;height:0px;line-height:0px;width:0px;margin:0px;padding:0px;overflow:hidden}
a{color333333;text-decoration:none;}
a:hover{colorFF0000;text-decoration:none;}
.page_style{width:1020px;margin:0px auto 0px auto;text-align:center;background-colorffffff;overflow:hidden;}

/*顶部及主菜单样式*/

.top_box{clear:both;width:100%;}
.top_box .logo{float:left;text-align:left;padding:5px 0 0px 0}
.top_box .topcontent{text-align:left;padding:0;border-bottom:0 solid #f7b62b;overflow:hidden;}
.top_box .topcontent .top{clear:both;height:25px;line-height:25px;background:url(images/bg_top.jpg) repeat-x 0 0;padding:0px 10px 0 15px;overflow:hidden}
.top_box .topcontent .topbanner{line-height:0px}

.menu_box{text-align:left;height:38px;background:url(images/menu_bg.jpg) repeat-x 0 0;padding:0px;}

.menu_box ul{clear:both;overflow:hidden}

.menu_style_homepage{float:left;text-align:center;width:100px;height:38px;}
.menu_style{float:left;width:100px;height:38px;text-align:center;background:url(images/menu_jg.jpg) no-repeat left top;font-size:14px;}

a.menu{display:block;text-align:center;width:100px;height:38px;line-height:38px;colorfff;text-decoration:none;font-weight:bold;font-size:14px;}
a.menu:hover{text-decoration:underline;background:url(images/menu_style.jpg) repeat-x 0 0;}

.menu_current a.menu{background:url(images/menu_style.jpg) repeat-x 0 0;}

/*banner样式*/

.banner{position:relative;clear:both;padding:0 0 0 0;margin:2px 0 0 0;text-align:left;}
.smallbanner{clear:both;padding: 0 0 0 0;margin:0 0 5px 0;}


/*网站主体框架样式*/

.main_box_style{margin:5px 0 5px 0;height:100%;padding:0 5px;}
.main_box_style .main_box_inner{clear:both;overflow:hidden}

.main_box_style1{margin:5px 0 0 0;height:100%;overflow:hidden;padding:0 5px;}
.main_box_style1 .main_box_inner{clear:both;overflow:hidden}
.main_box_style1 .main_box_inner_left{float:left;width:240px;margin:0 10px 0 0;overflow:hidden;text-align:left;backgroundf5e3bd;padding:5px;}
.main_box_style1 .main_box_inner_right{float:right;width:750px;margin:0 0 0 0;overflow:hidden;text-align:left;}

.main_box_style2{margin:5px 0 0 0;overflow:hidden;height:100%;padding:0 5px;overflow:hidden;}
.main_box_style2 .main_box_inner{clear:both;overflow:hidden}
.main_box_style2 .main_box_inner_left{float:left;width:750px;margin:0 10px 0 0;overflow:hidden;text-align:left;}
.main_box_style2 .main_box_inner_right{float:right;width:240px;margin:0 0 0 0;padding:0 0 0 0;overflow:hidden;text-align:left;padding:5px;}

.main_box_style3{margin:5px 0 10px 0;height:100%;overflow:hidden;}
.main_box_style3 .main_box_inner{clear:both;overflow:hidden}
.main_box_style3 .main_box_inner_left{float:left;width:220px;margin:0 10px 0 0;overflow:hidden;text-align:left;}
.main_box_style3 .main_box_inner_middle{float:left;width:540px;margin:0 0 0 0;overflow:hidden;text-align:left;}
.main_box_style3 .main_box_inner_right{float:right;width:220px;margin:0 0 0 10px;overflow:hidden;text-align:left;}

/*导航样式*/

.nav_box{clear:both;width:100%;margin:0 0 10px 0;overflow:hidden;}

.nav_title{font-weight:bold;border:0 solid #cccccc;border-width:0 0 0 0;height:35px;text-align:left;colorfff;background:url(images/nav_title_bg.jpg) no-repeat 0 0;overflow:hidden;}
.nav_sign{float:left;text-align:left;padding:0px 0 0 35px;line-height:35px;colorfff;font-size:13px;font-weight:bold}
.nav_more{float:right;paddingpx 10px 0 10px;margin:0 0 0 0;background:url(public/more_icon.gif) no-repeat 0 13px;}
.nav_more a{font-size:10px;line-height:15px}

.nav_content{margin:0 0 0 0;padding:5px 5px 5px 10px;text-align:left;border:1px solid #e06900;backgroundfff;}

.nav_menu{margin:10px 0 0 0;text-align:left;border:0px solid #e06900;}
.nav_menu li{text-align:left;margin-bottom:10px;}
.nav_menu li a{line-height:35px;font-size:14px;display:block;border:1px solid #e06900;backgroundfff url(images/nav_menu_bg.gif) no-repeat 13px center;padding:0 0 0 35px;}
.nav_menu li a.current{colorff0000;}

.nav_menu li ul{margin-top:5px;margin-left:20px}
.nav_menu li ul li{text-align:left;background-image:none;padding:0px;margin-bottom:0px}
.nav_menu li ul li a{display:inline;line-height:25px;padding:0px;font-size:13px;border:none;backgroundf5e3bd;}
.nav_menu li ul li a.current{colorD33506}

.nav_menu ul li ul li ul{padding:0 0 0 10px;}
.nav_menu ul li ul li span{float:left;height:25px;width:18px;background:url(images/file.png) no-repeat 0 center;}
.nav_menu ul li ul li span.node{background:url(images/folder_open.gif) no-repeat 0 center;cursor:pointer;}
.nav_menu ul li ul li span.node_close{background:url(images/folder_close.gif) no-repeat 0 center;cursor:pointer;}

/*模块样式*/
.module_box{clear:both;margin:0 0 8px 0;overflow:hidden;}                 /*模块整行布局样式*/
.module_box_layout_left{float:left;margin:0 0 8px 0;border:0 solid #cccccc;overflow:hidden;}  /*模块左布局样式*/
.module_box_layout_right{float:right;margin:0 0 8px 0;border:0 solid #cccccc;overflow:hidden;}   /*模块右布局样式*/

.module_box_inner{clear:both;height:100%;border:1px solid #f8cca9;overflow:hidden;}/*模块内层容器样式*/
.module_box_layout_left .module_box_inner{margin:0 10px 0 0;} /*模块居左时重写内层样式*/

.module_title{margin:0 0 0 0;height:29px;text-align:left;background:url(images/module.jpg) repeat-x 0 0;}
.module_sign{float:left;height:29px;line-height:29px;padding:0px 0 0 30px;font-weight:bold;background:url(images/module_signbg.png) no-repeat 5px center;colorfff;font-size:14px;}
.module_more{float:right;font-weight:normal;padding-right:5px}
.module_more a{font-size:12px;line-height:31px;}

.module_content{clear:both;padding:2px 5px 5px 5px;text-align:left;overflow:hidden;}

.module_footer{clear:both;height:1px;overflow:hidden;background-colorcccccc;display:none}
.module_footer .l{float:left;}
.module_footer .r{float:right}

/*子栏目样式*/
.lanmupage .current_location{display:none;}
.current_location{clear:both;text-align:left;height:35px;border:1px solid #f8cca9;border-bottom:none;background:url(images/location_bg.jpg) repeat-x}
.current_location_1{float:left;padding:0px 10px 0 25px;height:29px;line-height:29px;background:url(images/site_bg.jpg) no-repeat 10px center;}
.current_location_2{float:right;padding:5px 0 0 15px;display:none}

.sublanmu_box{text-align:left;border:1px solid #f8cca9;border-top:none;}
.sublanmu_content{padding:10px 15px 15px 15px;text-align:left;}
.sublanmu_content_introduct{line-height:2.0;font-size:1.1em} /*自定义内容子栏目样式*/
.sublanmu_content_introduct p{margin-bottom:10px;min-height:10px}

.sublanmu_page{clear:both;text-align:center;margin:15px 0 10px 0;font-size:12px;font-family:宋体;}
.sublanmu_page a{vertical-aligniddle;zoom:1;height:15px;line-height:15px;padding:2px 8px 3px 8px;border:1px solid #cccccc;}
.sublanmu_page span.c{padding:2px 2px 3px 2px;font-weight:bold;border:0px solid #cccccc;}
.sublanmu_page span{vertical-aligniddle;zoom:1;height:15px;line-height:15px;padding:2px 8px 3px 8px;}
.sublanmu_page span.c{padding:2px 2px 3px 2px;border:0px solid #cccccc;}


/*评论*/
.comments_box{text-align:left;border:1px solid #cccccc;margin:10px 0 10px 0;}
.comments_box .title{padding:2px 0 0 10px;height:20px;font-weight:bold;background-colorececec}
.comments_box ul li{padding:5px 0 5px 25px;}
.comments_box .textarea{width:520px;height:100px;border:1px solid #cccccc;border-color000000 #cccccc #cccccc #000000;}

.comments_list{padding:5px 0 0 0;border:0px solid #cccccc;overflow:hidden}
.comments_list .title{display:block;padding:2px 0 3px 5px;height:18px;width:100%;font-weight:bold;}
.comments_list .item{clear:both;margin:0 0 10px 0;overflow:hidden}
.comments_list .header{padding:3px 0 0 10px;height:22px;background-coloreeeeee}
.comments_list .header .floornum{font-size:12px;font-style:Italic;font-weight:bold}
.comments_list .header .left{float:left}
.comments_list .header .right{float:right;padding-right:10px}
.comments_list .quote{display:block;color999999;padding:5px 5px 5px 10px;border:1px solid #ececec}
.comments_list .content{padding:5px 5px 5px 15px}
.comments_list .reply{background:url(public/reply.gif) no-repeat 5px 5px;border:1px dashed #cccccc;padding:2px 5px 2px 25px;margin:2px 0 5px 0;colorD33506}

.comments_page{clear:both;vertical-aligniddle;text-align:right;background-colorffffff;margin:10px 0 10px 0;font-family:宋体;font-size:12px}
.comments_page a{height:15px;line-height:15px;vertical-aligniddle;zoom:1;padding:2px 8px 2px 8px;border:1px solid #cccccc;}
.comments_page span{height:15px;line-height:15px;vertical-aligniddle;zoom:1;padding:2px 5px 2px 5px;}
.comments_page span.c{vertical-aligniddle;padding:2px 3px 2px 3px;font-weight:bold;}


/*bottom样式*/
.bottom_box{clear:both;padding:10px 0 10px 0;border:0 solid #666666;margin:10px 0 5px 0;text-align:left;background:url() repeat-x 0 0;width:100%;text-align:center;border-top:3px solid #cc0000}
.bottom_box .bar{height:25px;padding:5px 0 0 0;colorffffff}
.bottom_box .bar a{colorffffff}


/*登陆界面*/
.loginbox_item{height:20px;padding:0 0 0 0;padding:0 5px 5px 0;text-align:left;font-size:9pt;}
.loginbox_textbox{width:100px;height:15px;border:0 solid #cccccc;border-width:1px 1px 1px 1px;vertical-aligniddle;}
.loginbox_textbox_yzm{width:40px;height:15px;border:0 solid #cccccc;border-width:1px 1px 1px 1px}
.loginbox_submit{width:50px;height:19px;border-width:0px;background-colorA30001;colorfff;font-size:12px;border-radius:2px;cursor:pointer;vertical-aligniddle;}
a.logined_hrefnk{font-size:9pt;colorFF0000;text-decoration:underline}
a.logined_href:visited{font-size:9pt;colorFF0000;;text-decoration:underline}
a.logined_href:hover{font-size:9pt;colorFF0000;text-decoration:underline}

/*问卷调查*/
.vote{width:95%;text-align:center;margin:0px auto 0px auto;}
.votetitle{height:23px;padding:5px 0px 0px 0;font-weight:bold;font-size:14px;border:1px dotted #cccccc;border-width:0 0 1px 0;}
.voteinfo{padding:2px 0 2px 0}
.vote .description{text-align:left;padding:10px 0 10x 0}
.vote .quesion{text-align:left;font-weight:bold;font-size:12px;padding:5px 0 0 0}
.vote .choice{text-align:left;padding:3px 0 2px 5px}


/*其他样式*/
.textarea{border:1px solid #cccccc;border-color000000 #cccccc #cccccc #000000;}
.button{width:55px;font-size:9pt;height:19px;cursor:pointer;background-image:url(public/button.gif);background-position: center center;border-top: 0px outset #eeeeee;border-right: 0px outset #888888;border-bottom: 0px outset #888888;border-left: 0px outset #eeeeee;padding-top: 2px;background-repeat: repeat-x;}
.tb{border:1px solid #cccccc;border-color000000 #cccccc #cccccc #000000;padding:2px 3px}
.bt{height:22px;width:70px;font-size:9pt;padding-top:2px;cursor:pointer;border-width:0px;}
TOP
7#

  1. .menu_box ul{clear:both;overflow:hidden;text-align:center}

  2. .menu_style_homepage{display:inline-block;text-align:center;width:100px;height:38px;}
  3. .menu_style{display:inline-block;width:100px;height:38px;text-align:center;background:url(images/menu_jg.jpg) no-repeat left top;font-size:14px;}
复制代码
修改成这样
TOP
8#

[b]回复 [url=http://bbs.pageadmin.net/showtopic-37846.aspx#141979]8楼[color=Olive]xiyou[/color]的帖子[/url][/b]

改好了,谢谢xiyou
TOP
发新话题 回复该主题