這可能是一個小問題,所以,如何浮動 - 離開<section>
標籤?我試圖使用float: left;
,但不起作用,或者是否可以垂直排列標籤及其內容?如何在html5中浮動段標籤
這是我的嘗試。
html。
<div id="divcontent">
<section>
<h1>heyo</h1>
<a href="dropitinmyass.html" ><p>asdasdasdasd</p></a>
</section>
<section>
<h1>heyo</h1>
<a href="dropitinmyass.html" ><p>asdasdasdasd</p></a>
</section>
<section>
<h1>heyo</h1>
<a href="dropitinmyass.html" ><p>asdasdasdasd</p></a>
</section>
</div>
這裏是css。
#divcontent {overflow: auto; padding: 15px;}
#divcontent section {float:left; width: 300px;}
請的jsfiddle吧.. – 2012-08-11 18:02:33