Results 1 to 2 of 2

Thread: CSS Top Frame Layout

  1. #1
    Join Date
    Mar 2007
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question CSS Top Frame Layout

    URL:http://www.dynamicdrive.com/style/la...-frame-layout/

    Can anyone help me to adjust the maincontent top margin section so that it does not dissappear behind the static "frame" when resized.

    I've tried seeting position to None and top to 280px but it remains "fixed"

    Code:
    #maincontent{
    position: none; 
    top: 280px; /*Set top value to HeightOfFrameDiv*/
    left: 0;
    right: 0;
    bottom: 0;
    overflow: auto; 
    background: #fff
    }

  2. #2
    Join Date
    Feb 2007
    Posts
    293
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The position for maincontent has to stay fixed, otherwise it will go behind the frame.

    If you want to adjust the frame and content to make more room for content, you would change the numbers for both height of framecontent and top of maincontent, keeping them equal.

    Code:
    #framecontent{
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100px; /*Height of frame div*/
    overflow: hidden; /*Disable scrollbars. Set to "scroll" to enable*/
    background-color: navy;
    color: white;
    }
    
    
    #maincontent{
    position: fixed; 
    top: 100px; /*Set top value to HeightOfFrameDiv*/
    left: 0;
    right: 0;
    bottom: 0;
    overflow: auto; 
    background: #fff;
    }

Bookmarks

Posting Permissions

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