I'm designing a header which is made of 3 parts.
The page must be fluid: min-width:940px; max-width:1200px;
The first two parts of the header will be fixed size:
left middle right
<---------><---------><----------------->
134px 183px (Fill the remaining space)
I'd like the right part to change depending on the size of the page, I'll paste what I have so far but my problem is making it fill the gap completetly.
HTML:
<div class="main">
<div class="left"></div>
<div class="middle"></div>
<div class="right"></div>
CSS:
.main{
margin:auto;
min-width:940px;
max-width:1200px;
background-color:#000;
}
.left{
float: left;
width: 134px;
height: 191px;
background-color:#0000ff;
}
.middle{
float: left;
width: 183px;
height: 191px;
background-color:#ffff00;
}
.right{
float: left;
width: 60%;
height: 191px;
background-color:#ff0000;
}
I don't have enough reputation to comment, but I just wanted to endorse the correctness of the previous answer. I was looking for something slightly different: fixed-liquid-fixed, so tweaked it as follows:
Key points to notice: - margins, with float, are used to prevent the body overlapping with the edges. - in my case, you need to reverse the order of the divs in the html - you actually don't need a div for the "middle". One site that does without is the quirksmode blog (it just sets margins directly on the "body" element): http://www.quirksmode.org/blog/archives/browsers/index.html
Try this: