<style type="text/css">
.x-container img {
float: left;
margin-right: 15px;
}
.content img{
clear:both;
}
</style>
<div class="x-container span-18">
<div class="content">
<img src="image.jpg" id="disneland-img">
</div>
<h2>Hello</h2>
</div>
我有上面的html。我期待clear:both
in .content img
will override float:left
of .x-container img
,但事实并非如此。
请问我怎样才能做到这一点?