Click to See Complete Forum and Search --> : height:100%;overflow:auto; -not position:fixed


php_hazard_01
12-19-2007, 05:53 PM
is this possible, i have this layout, much like at http://www.cssplay.co.uk fixed layouts..but the content inside is not position:fixed.

--------------------------------
header
--------------------------------
submenu
--------------------------------
|
content 1 | content 2
|
|
--------------------------------
footer
--------------------------------
the header to the bottom of the content is position fixed, seperately with the footer, width fixed top bottom, left and right values. now my problem lies within the content, the submenu is collapsible thus the content must move upward. now the text, or elements inside content 2 must have an overflow:auto value, they must not exceed the page's fixed view (they must not overflow from the content 2 box)
meaning the elements inside the content 2 dynamically fits the content 2s container, on different resolutions..

the solutions i've tried, position:fixed on all elements - this will leave out the collapsible submenu to have extra space with the header and content

height:60%/40% on container 2 child elements - this did manage the closest result. but an excess of 10% height is appliad at the bottom, which i dont know where it came from, suspecting from the 100% height of the parent element

the same problem applies with content 1.

I used Firefox with this...GO firefox..

if you dont understand what i just said, please...i will explain it a little better...just give me an idea or a link to what you think is the solution....

Centauri
12-20-2007, 05:00 AM
Not sure I understand what you want here. With Stu's fixed header/footer layouts, such as http://www.cssplay.co.uk/layouts/basics2.html , content area should behave independantly like a normal page, and content should be able to shift up and down with an expanding menu (if the menu is within the content area). However, if you are incorporating the expanding menu within the fixed header area, then you will more than likely have to resort to javascript to dynamically adjust the height of the top padder within the content area (the one that moves the content down to clear the header).

Trying to set percentage heights to inner elements is doomed to failure due to the top and bottom padders.

php_hazard_01
12-20-2007, 05:05 AM
yes..can you lead me to a post that relates to the javascript that does what you said?..

Centauri
12-20-2007, 05:12 AM
I'm not much of a javascript person, so posting a question in the javascript forum, refering to this thread, may give you an answer.

php_hazard_01
12-20-2007, 05:14 AM
okay oaky..thank you..:D as i was waiting for an answer i resorted to another solution...:D dump the thing...haha..LoL, but i would like the answer though...haha.oaky see you..