CSS 100% issues

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

CSS 100% issues

Post by JayBird »

Code: Select all

Div 1 - Unknown height  
-----------------------------------------------------------
|                      |                                  |  <-- This DIV is filled with content from
| -------------------- |                                  |      the database, so the height will be
| |                  | |                                  |      unknown
| |    Div 2         | |                                  |
| |    height:40px   | |                                  |
| |                  | |                                  |
| -------------------- |                                  |
| |                  | |
| |    Div 3         | |
| |    heght:100%    | |  <---- This DIV 3 should fill any leftover space
| |                  | |        and push the DIV below it to the bottom
| -------------------- |        of the main outer DIV
| |                  | |
| |    Div 4         | |                                  |
| |    height:40px   | |                                  |
| |                  | |                                  |
| -------------------- |                                  |
|                      |                                  |
-----------------------------------------------------------
The only way i can get DIV 3 to fully expand vertically is by setting a height on the parent DIV, but as i dont know how much content there will be in that DIV for each page, i cannot set the height attribute...the content stretches the DIV as required.

Is there any way around this?

Thanks
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Post by hawleyjr »

This guy has some good examples of layouts similar to what you’re doing.

http://www.cssplay.co.uk/layouts/index.html

That may help...
User avatar
JayBird
Admin
Posts: 4524
Joined: Wed Aug 13, 2003 7:02 am
Location: York, UK
Contact:

Post by JayBird »

Thanks...nice site, could be useful.

Ive cheated tho, and gone for a CSS/Table combination becuase im running on a tight deadline...hopefully ill get chance to go back and change it at a lter date
Post Reply