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> 

http://jsfiddle.net/u3hr5/2/

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

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -