html没有宽度 居中显示,HTML&CSS:为什么我不能在一个部分居中使用margin:0 auto并设置其宽度?...

Section - User Content

Notifications

Why I can't center this? I already use margin:0 auto;

Article - Left Content

User Menus

Shout to the world

Shout to the world:

if(isset($_POST['share'])){

}

?>

Aside - Right Content

这里是我的CSS代码

/*user content styles*/

/*section styles*/

section#usercontent {

width:600px;

background-image:url('../img/content.png');

font-size:13px;

color:#323232;

}

section#usercontent h1 {

visibility:hidden;

position:absolute;

}

/*clear floats*/

section#usercontent div#clearfloats {

clear:both;

}

section#usercontent article#notifications {

width:500px;

height:20px;

margin:0 auto;

}

/*article styles*/

section#usercontent article {

width:220px;

float:left;

margin-left:10px;

}

section#usercontent article section#menuform {

border:1px solid black;

height:50px;

}

section#usercontent article section#shareform {

border:1px solid black;

}

section#usercontent article section#shareform table {

margin:0 auto;

margin-bottom:8px;

margin-top:8px;

}

section#usercontent article section#shareform table td {

padding:2px;

}

section#usercontent article section#shareform input#btn_share {

border:1px solid #E0BE47;

border-radius:8px;

width:58px;height:20px;

background-color:#FAF5CE;

cursor:pointer;

font-size:12px;

color:#323232;

float:right;

}

section#usercontent textarea {

height:55px;

}

/*aside styles*/

section#usercontent aside {

width:340px;

float:right;

margin-right:10px;

}

section#usercontent aside, section#usercontent article {

margin-top:10px;

margin-bottom:10px;

border:1px solid #E0BE47;

border-radius:8px;

}

输出

HhPCt.png

我得到了这方面的节#usercontent文章#通知我不是问题知道如何让它居中我已经使用margin:0 auto;需要解决这个问题的建议,谢谢!

2012-08-26

Sui Go

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值