我想将内容居中,.SideBarFirst div但不知道如何实现。
有人可以帮助我解决不基于添加元素padding或值的解决方案吗?left/right
CSS:
body {
    width: 960px;
    margin: 0 auto;
} 
.content {
    width:500px; 
    float: left;
}
.SideBarFirst {
    width:460px; 
    float: right;
}
.SideBarFirst div {
    width: 40px;
    margin: 0 auto; 
}
HTML:
<body>
    <div class="content">test</div>
    <div class="SideBarFirst">
        <div>not working for center</div>
    </div>
</body>
我当前的代码:http: //jsfiddle.net/mmnaderi/yTCkx/