Forum Moderators: not2easy

Message Too Old, No Replies

fixed width box next to "rest of the page-width box"?

         

avermat

8:20 pm on Jul 31, 2005 (gmt 0)

10+ Year Member



This is a little hard to explain but can I have a box with a certain pixel width and then have a box to the right of that to just take up the rest of the width of the screen? I know I could use a certain percentage but that just doesn't work well because the percentage has to be small if I want it to fit on an 800 width screen.

The next question is could I have a box below that to be the same width as the total of the two boxes above?

Hopefully this makes sense, I guess I was just hoping there was some code for stretch to the end of the screen.

Thanks because I'm new to this CSS stuff.

SugarKane2

9:55 pm on Jul 31, 2005 (gmt 0)

10+ Year Member



Test this simple skeleton markup, it seems like what
you are after:

<html>

<head>

<style>
#littlebox {border: 1px solid red; width: 200px; height: 50px; float: left}
#biggerbox {border: 1px solid blue; height: 50px;}
#fullbox {border: 1px solid green; height: 50px; clear: left}
</style>

</head>

<body>

<div id="littlebox">i have a defined width</div>
<div id="biggerbox">i go all the way</div>
<div id="fullbox">I am the sum of the above</div>

</body>
</html>