Forum Moderators: not2easy

Message Too Old, No Replies

Percentages and Pixels...for layout

Is it possible to...

         

madcat

1:43 am on Feb 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You know how with frames it is possible to use an * to set the variable width for an area of your page...is there something similar to this in CSS?

For example, if I had three <div>'s splitting the page vertically, and the first <div>'s width was set to 300px, the second to 200px-- the third I would want to be set to a % width so that it expands and contracts according to browser resolution.

* just don't declare a width for the third <div>?

I may be making this much more difficult than it is.

Purple Martin

5:24 am on Feb 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Make the third div 100% wide with 500px padding on the left.

DrDoc

6:14 am on Feb 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



...that would make it 100% + 500 px :(

I assume the divs are floated? How about just floating it left, so it will butt up next to the other two... It will expand to fill the space automatically. :)

If the divs are not floated (but absolutely positioned) you can just give it a left margin of 500px (still no set width) and it will work fine :)

Purple Martin

10:22 pm on Feb 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



...that would make it 100% + 500 px :(

I forgot to mention that the div would be absolutely positioned with left:0px;