Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Cabbit

macrumors 68020
Original poster
Jan 30, 2006
2,128
1
Scotland
Is is possible to have a two divs, one that has a fixed width and the other that has a flexible width inside a container div that is also flexible.

width.png
 
HTML:
<div id="container" style="width:100%;">
       <div id="leftbox" style="width:200px; float:left;">
       Fun
       </div>
       
      <div id="rightbox" style="width:auto; float:right;">
      <hr style="width="100%">
      </div>
</div>

That's how I would do it. replacing the Fun and <hr> appropriately.
 
yes. but would you even need the container div?

Ed

You would if you wanted both of those divs to be less than the full width of the browser window. E.g. you want the design centered int he window and to occupy 75% but you want the sidebar to be fixed width and the other to fill the remainder of the area.
 
Ok I agree, but her container is not fixed, so I am assuming she wants to use all of the window space.

Ed
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.