我有以下内容,我希望正确的 div 与父级的顶部对齐,但这对我来说并没有发生..
<div id="container">
<div id="center">Center</div>
<div id="left">Left text here...</div>
<div id="right"><img src="image.png" width="75" height="75" /></div>
</div>
CSS
#container{
width:50%;
overflow:auto;
border-style:solid;
border-width:1px;
border-color:#aaaaaa;
vertical-align: top;
}
#left{
width:100px;
border-style:solid;
border-width:1px;
border-color:#aaaaaa;
}
#right{
float:right;
width:100px;
text-align:right;
vertical-align: top;
border-style:solid;
height:100px;
width:100px;
border-width:1px;
border-color:#aaaaaa;
}
#center{
float:left;
padding-bottom: 10px;
width:100px;
border-style:solid;
border-width:1px;
border-color:#aaaaaa;
}