Below is a simple solution that demonstrates how to achieve the desired layout (view demo here). The CSS is styled to showcase the different elements with colors, but the key steps are outlined as follows:
For the Fixed Element:
- Set
float:right
- Assign a fixed width
For the Fluid Row Element:
- Add
padding/margin-right
equal to the width of the fixed element
- Use
box-sizing:border-box
to maintain 100% width without extending due to margin/padding. The example markup below includes the essential components.
CSS
#fixed-width {
width:100px;
float:right;
}
#fluid.row-fluid {
margin-right:100px;
-webkit-box-sizing:border-box;
-moz-box-sizing:border-box;
box-sizing:border-box;
}
HTML
<div class="clearfix">
<div id="fixed-width">Content...</div>
<div id="fluid" class="row-fluid">
<div class="span4">a</div>
<div class="span4">b</div>
<div class="span4">c</div>
</div>
</div>