我自己學習HTML/CSS,大多數時候我在寫每一行時都會遇到錯誤。 我不知道爲什麼我的右側欄沒有像左側那樣正確放置。請看this jsfiddle。我的右側邊欄無法像左側邊欄一樣正常工作?
<div class="bo">
<div class="left">
<div class="lside">
<div class="lhead"></div>
</div>
</div>
<div class="pbo">
<div class="post">
<div class="hpost">
<img src="1016949_702659679791359_6170947506430480265_n.jpg" height=50 width=50 />
<p>VigneshWarar </p>
</div>
</div>
</div>
<div class="right">
<div class="rside"></div>
</div>
</div>
CSS
.bo{
top:0px;
width:1150px;
background: #FAFAFA;
}
.pbo{
width: 500px;
margin-left: auto;
margin-right: auto;
margin-top: 60px;
height:500px;
}
.post{
height: 390px;
width: 450px;
margin-left: auto;
margin-right: auto;
margin-top: 80px;
background: #000;
border: 1px solid #e8e8e8;
top: 0px;
}
.hpost{
width:100%;
height: 50px;
border: 1px solid #ddd;
border-top:none;
border-right: none;
border-bottom: 1px solid #e8e8e8;
}
.hpost p{
margin-left: 56px;
margin-top: -49px;
font-family: 'Open Sans', sans-serif;
}
.lside{
width: 300px;
height: 300px;
float: left;
background:#FF0000;
border: 1px solid #e1e8ed;
}
.lhead{
height: 40px;
}
.rside{
float: right;
width: 300px;
height: 300px;
background:#0000FF;
border: 1px solid #e1e8ed;
margin-top: inherit;
}
使用您在'左sidebar'用於'權side' –
相同的規則我可以找到任何樣式? –
這是我做的事情但它是顯示下的帖子div –