我有這個網站:類內部多個div:
<div class="container">
<div id="sidebar">
<ul><a href="welcome.php">Create Offer</a></ul>
<ul><a href="pending.php">Accept Offer</a></ul>
<ul><a href="pending.php">Pending</a></ul>
<ul><a href="pending.php">Completed</a></ul>
<ul><a href="pending.php">Balance</a></ul>
<ul><a href="pending.php">Support</a></ul>
</div>
<div id="items">
Text
</div>
</div>
這是CSS:
.container {
margin: 0 auto;
background-color: white;
border: 1px solid black;
width: 1000px;
}
#sidebar {
margin-top: 0px;
padding-top: 0px;
width: 18%;
background-color: #E3E3E3;
height: 100%;
}
.container #items {
width: 82%;
float: right;
background-color: red;
}
輸出:http://puu.sh/l719c/52f182e1d2.png
爲什麼不會的項目DIV在容器內顯示邊欄旁邊的空白處?
謝謝。
@whoever_did_the_down_vote爲什麼倒票.. ??任何問題...?? –