0
這裏是我的代碼演示http://jsfiddle.net/mn7Ut/ 我似乎無法找到一種方法來正確添加h1下的文本。這是當我嘗試添加一些文字時會發生什麼http://jsfiddle.net/uY3pQ/ 這次我做錯了什麼? :C浮動DIV問題
div {margin:0; padding:0;}
#wrap {
background-color:#000000;
width:auto;
float:left;
padding:50px;
}
.container {
width:500px;
background:#666666;
color:#FFFFFF;
float:left;
margin-right:25px;
}
.left {
float:left;
display:block;
}
.padding {
padding:30px;
}
.list {
background-color:#333;
}
.box {
background-color:#ccc;
width:100px;
}
h1 {
color:#000;
background:#ddd;
}
。
<div id="wrap">
<div class="container">
<div class="box-container">
<h1 class="left padding">Some text here</h1>
<ul class="list padding left">
<li>Some text here Some text here</li>
<li>Some text here Some text here</li>
<li>Some text here Some text here</li>
<li>Some text here Some text here</li>
<li>Some text here Some text here</li>
<li>Some text here Some text here</li>
<li>Some text here Some text here</li>
<li>Some text here Some text here</li>
</ul>
</div>
</div>
<div class="box padding left">
Some text here Some text here Some text here
</div>
</div>
太簡單了。謝謝! – devotchkah 2013-02-21 20:43:52
@devotchkah沒問題! – 2013-02-21 20:50:08