www.webdeveloper.com
Results 1 to 7 of 7

Thread: developing for IE 6 - fixed position

  1. #1
    Join Date
    Jun 2003
    Posts
    39

    developing for IE 6 - fixed position

    I'll start with my code.

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    <style type="text/css">
    body {	
    	height: 100%;
    	width: 100%;
    	overflow: hidden;
    	margin: 0px;
    	padding: 0px;
    }
    #menu {
    	position: absolute;
    	display:block;
    	bottom:0px;
    	left:0px;
    	width:100%;
    	border:1px solid #002E80;
    	background-color: #E5EFFF;
    }
    #content{
    	padding: 5px;
    	width: 100%;
    	height: 100%;
    	overflow: auto;
    	z-index: 100;
    }
    </style>
    </head>
    <body>
    <div id="content">
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.
    </div>
    <div id="menu">
      <table width="100%"  border="0">
      <tr>
        <td><div align="left">
          <input type="button" name="prevBut" value="<< Prev" />
        </div></td>
        <td><div align="right">
          <input type="button" name="nextBut" value="Next >>" />
        </div></td>
      </tr>
    </table>
    </div>
    </body>
    </html>
    The problem falls on the positioning of the scrollbar. I need it to be over my bottom menu. Right now it falls below the menu. Why is this?

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    You have overflow: hidden; in body which hides the body's scrollbar.
    The scrollbar you see is from the content.
    Adding margin-bottom:2em; to body will bring the scrollbar up above the menu.
    If you change the menu contents you will have to re-adjust margin-bottom.

    BTY all the height: 100%; and width: 100%; is probably unnecessary.
    Using the XML prolog puts IE into "quirks" mode which allows the "fixed" effect to work, it may also give you problems later with the box model in x-browser layout.

  3. #3
    Join Date
    Jun 2003
    Posts
    39
    I'm using overflow:hidden in the body tag so that I don't have two scrollers. I'm trying to create a bottom frame effect. I only want the content to scroll.

  4. #4
    Join Date
    Jan 2004
    Location
    United Kingdom
    Posts
    610
    Well how about only defining overflow for the bottom bar rather than the whole page.
    More of a journal than a blog.

    Truly great madness cannot be achieved without significant intelligence.
    GMail | Mezzoblue | 1976 Design | Zeldman | Justwatchthesky | Jon Hicks | Airbag | All In The Head

  5. #5
    Join Date
    Jun 2003
    Posts
    39
    Thanks for the responses!

    Unfortunately I tried that earlier with no success. I feel like I'm very close. All I need is for the content scroller to appear above the bottom menu. I've come to realize that accomplishing this task is easier said than done.

  6. #6
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    What's the problem with this?
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    <style type="text/css">
    body {	
    	height: 100%;
    	width: 100%;
    	overflow: hidden;
    	margin: 0px;
    	padding: 0px;
        margin-bottom:2em;
    }
    #menu {
    	position: absolute;
    	display:block;
    	bottom:0px;
    	left:0px;
    	width:100%;
    	border:1px solid #002E80;
    	background-color: #E5EFFF;
    }
    #content{
    	padding: 5px;
    	width: 100%;
    	height: 100%;
    	overflow: auto;
    	z-index: 100;
    }
    </style>
    </head>
    <body>
    <div id="content">
    content here
    </div>
    <div id="menu">
      <table width="100%"  border="0">
      <tr>
        <td><div align="left">
          <input type="button" name="prevBut" value="<< Prev" />
        </div></td>
        <td><div align="right">
          <input type="button" name="nextBut" value="Next >>" />
        </div></td>
      </tr>
    </table>
    </div>
    </body>
    </html>

  7. #7
    Join Date
    Jun 2003
    Posts
    39
    Wow, I must have been at this too long. That's exactly what I need. Thanks a bunch!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles