我试图让两个 div 并排显示,我什至将它们浮动到没有运气。这是为什么?
<div class="popup-container">
<div class="popup-header">
<div class="popup-image-holder"></div>
<div class="image-titles">Content for class "image-titles" Goes Here</div>
</div>
</div>
.popup-container {
padding: 0px;
width: 764px;
}
.popup-header {
background-color: #000;
padding: 21px;
height: 243px;
width: 100%;
overflow: hidden; /* add this to contain floated children */
}
.popup-image-holder {
float; left;
background-color: #FFF;
height: 165px;
width: 165px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
-khtml-border-radius: 3px;
border-radius: 3px;
padding-top: 5px;
padding-left: 5px;
}
.image-titles {
float: left;
height: 100%;
width: 300px;
background-color: #666;
}
谢谢编辑:JsFiddle