Forum Moderators: not2easy
I've tried the "100% high <body>" with a 100% hight div, but this just fixes the div height to the screen - it will no longer expand with the content.
Is there any sort of simple solution here? Am I overlooking something obvious?
Thank you for any help.
BTW, a good way to clear elements.. better than <div class="clear"> </div> ... is <br class="clear" />
and the css for it ..
br.clear {height:0;line-height:0;font-size:0;clear:both;}
Nice and simple, right?
Hope I helped,
Mehigh
Thanks for the tip, but that's not quite my problem... I needed the div to both expand to the height of the window (if shorter) and expand with the content within (if longer). After reading around, this seems to be one of those "holy grails" of css design. I cheated - I made a centred y-repeating horizontal band "drop shadow" background.
Now I'd like to make the footer a) stick to the bottom of the page if the content is too short yet b) stay below the content if it is longer than the window height. Same problem all over it seems!