View Full Version : CSS "Frames", Navbar, Iframe resizing and background color issue

02-03-2007, 10:03 AM
I'm having some trouble with a page I'm working on that involves a navigation bar (vertical, on the left side), CSS "Frames" - basically using CSS to create the appearance of frames rather than using actual frames (in order to make the navbar submenus appear on top of everything else), and an IFRAME used to display page content.
So, in order for the IFRAME not to have scrollbars I have some javascript which resizes the height of the frame according to the size of the source document for the frame. The width is always 100% for the IFRAME since it's within a CSS "frame".
The Navbar is also within a CSS "frame" that has a height of "100%". I have given this "frame" a background color - so there is a solid stripe of color along the left edge of the screen. However, I notice that when the IFRAME is resized, the background color for the Navbar no longer reaches the end of the page and there is white space instead of the color I want. So, I concluded that I need some scripting to resize the height of the CSS "frame" but I can't seem to get it working properly. I can change the height of the "frame" by setting the style.height attribute of the div element to some value (e.g. 100%) but even if I use this onload it will not display properly.
My question is: how can I resize the Navbar such that it will reach to the end of the screen each time the IFRAME is resized? More specifically, how, once I have changed the height of the div (i.e. the CSS "frame"), do I get that change to show up?


02-10-2007, 12:36 AM
Nevermind, I changed the CSS "Frames" to a table, which automatically resizes when its content changes. That way when the IFRAME size changes the navbar size changes with it and extends the full length of the page.