私は垂直に塗りつぶそうとしています(そしての高さに一致#sidebar
します)。どうすればいいですか?#main
#content
CSS:
#main {
border: solid green 2px;
}
#sidebar {
background-color: red;
width: 20%;
overflow: auto;
float: left;
height: 100%;
}
#content {
background-color: orange;
width: 80%;
overflow: auto;
float: left;
height: 100%;
}
#main-footer {
clear: both;
}
そしてhtml:
<div id="main">
<div id="sidebar">
<ul>
<li>abc</li>
<li>def</li>
</ul>
</div>
<div id="content">
defsdfasdfasd fjasd;lf jasdl;fkjasd; lfjas; lfkjadsfl;sdajfs dlfjsdlfksjflaskfjsdaljfasdl asdfsad sfljsf sadfjsldfj sakfj;alsdfj dfsjsadfl;j asdlfjl;asdfj
defsdfasdfasd fjasd;lf jasdl;fkjasd; lfjas; lfkjadsfl;sdajfs dlfjsdlfksjflaskfjsdaljfasdl asdfsad sfljsf sadfjsldfj sakfj;alsdfj dfsjsadfl;j asdlfjl;asdfj
</div>
<div id="main-footer">
</div>
</div>