css - Middle div 100% width -
how make middle div take remaining space left in width, still staying in place beside 2 other divs? if remove either of 2 divs on sides, main div should take space there left?
code:
<div class="row-fluid"> <div class="span12"> <div class="sidebar">1</div> <div class="content-box">2</div> <div class="sidebar">3</div> </div> </div>
my suggestion using table since want of them on same row own heights. html:
<div class="row-fluid"> <table style="width: 100%"> <tr> <td class="sidebar">1</td> <td class="content-box">2</td> <td class="sidebar">3</td> </tr> </table>
css:
.sidebar { width:225px; background-color:blue; } .content-box { background-color:red; }
here fiddle edit: http://jsfiddle.net/mdpex/
//flipbed
Comments
Post a Comment