纷纭教育
您的当前位置:首页怎么让这个框居中呢_html/css_WEB-ITnose

怎么让这个框居中呢_html/css_WEB-ITnose

来源:纷纭教育


怎么让这个框居中呢
css码

@charset "utf-8";
/* CSS Document */

html{height:100%;border:none;}
body{height:100%;border:none;padding:0;margin:0;text-align:center;font-size:14px;color:#000;background-color:#FFF;}
div,ul,li,img{margin:0;padding:0;border:none;}
ul{list-style-type:none;}
table,input{font-size:12px;}
a:link{ color:#09F; text-decoration:none; }
a:visited{ color:#09F; text-decoration:none; }
a:hover{ color:#09F; text-decoration:none; }
a:active{ color:#09F; text-decoration:none; }

.mass{width:1024px;}
.center{text-align:center;}
.clear{ clear:both;visibility:hidden;font-size:0px;}
.border{ border:#F00 solid 1px;}



html 码




无标题文档




text


回复讨论(解决方案)

自身的居中是margin:0 auto;
demo here

   text

自身的居中是margin:0 auto;
demo here

   text



这个左漂 右漂怎么不起作用?

css码

@charset "utf-8";
/* CSS Document */

html{height:100%;border:none;}
body{height:100%;border:none;padding:0;margin:0;text-align:center;font-size:14px;color:#000;background-color:#FFF;}
div,ul,li,img{margin:0;padding:0;border:none;}
ul{list-style-type:none;}
table,input{font-size:12px;}
a:link{ color:#09F; text-decoration:none; }
a:visited{ color:#09F; text-decoration:none; }
a:hover{ color:#09F; text-decoration:none; }
a:active{ color:#09F; text-decoration:none; }

.mass{width:1024px;margin: 0px auto}
.center{text-align:center;}
.clear{ clear:both;visibility:hidden;font-size:0px;}
.border{ border:#F00 solid 1px;}


#nav{}
#nav.left{ float:left;width:226px;}
#nav.right{ float:right;width:501px;}

html码





无标题文档






text
text












自身的居中是margin:0 auto;
demo here

   text



这个左漂 右漂怎么不起作用?

css码

@charset "utf-8";
/* CSS Document */

html{height:100%;border:none;}
body{height:100%;border:none;padding:0;margin:0;text-align:center;font-size:14px;color:#000;background-color:#FFF;}
div,ul,li,img{margin:0;padding:0;border:none;}
ul{list-style-type:none;}
table,input{font-size:12px;}
a:link{ color:#09F; text-decoration:none; }
a:visited{ color:#09F; text-decoration:none; }
a:hover{ color:#09F; text-decoration:none; }
a:active{ color:#09F; text-decoration:none; }

.mass{width:1024px;margin: 0px auto}
.center{text-align:center;}
.clear{ clear:both;visibility:hidden;font-size:0px;}
.border{ border:#F00 solid 1px;}


#nav{}
#nav.left{ float:left;width:226px;}
#nav.right{ float:right;width:501px;}

html码





无标题文档






text
text












#nav .left{ float:left;width:226px;}
#nav .right{ float:right;width:501px;}
中间要有空格,表示下属关系。
显示全文