css - Display 3 div next to each other -
i have 3 divs complete length of 150% dont them float in 1 line: here html:
<div class="clearfix"> <div class="left" id="w1">test</div> <div class="left" id="w2">test</div> <div class="left" id="w3">test</div> </div>
and css:
html,body { height:100%;width:auto;} .left { float: left; } #w1 {width:20%; background-color:#009; } #w2{width:100%; background-color:#9f3; } #w3{ width:30%; background-color:#30c;}
here full code on fiddle: http://jsfiddle.net/szwxn/1/ besides nice if each panel has height o 100%!
if want 3 div in row use float:left div, can not take 150% width in total of div width. can take 100% maximum. so, adjust width of div , take total 100%.
Comments
Post a Comment