Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Feb 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CSS "Frames", Navbar, Iframe resizing and background color issue

    Hello,
    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?

    Thanks

  • #2
    New to the CF scene
    Join Date
    Feb 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •