Reputation: 1175
Below is css code.
#cont {
width:800px;
margin-right:auto;
margin-left:auto;
border:1px dashed red;
padding:2px;
}
#third, #second, #first {
width:260px;
float:left;
margin:2px;
}
Html code:
![<div id="cont">
<div id="third"><p>A demo text </p></br>
<p>A demo text </p></br>
<p>A demo text </p></br>
<p>A demo text </p></br>
</div>
<div id="second"><p>A demo text </p></br>
<p>A demo text </p></br>
<p>A demo text </p></br>
<p>A demo text </p></br>
</div>
<div id="third"><p>A demo text </p></br>
<p>A demo text </p></br>
<p>A demo text </p></br>
<p>A demo text </p></br>
</div>
</div>][1]
Upvotes: 2
Views: 7493
Reputation: 2344
<div style="clear:both;float:none;"></div>
well solve your problem. added it under the div's
Upvotes: 0
Reputation: 394
add overflow:hidden;
#cont {width:800px;margin-right:auto;margin-left:auto; border:1px dashed red;padding:2px; overflow:hidden;}
Upvotes: 4