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 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Jun 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    height of menus differ in IE Windows

    I'm new to CSS and am having a problem with the positioning of my menu heights in Win IE. It displays how I want on all the major mac browsers, but the way that the left side menu renders in IE Windows does not give the correct height distances from the top of the screen. Things that have almost too much room in Safari, FireFox, and IE Mac have not enough in Win IE.

    Here is site in question:
    http://www.mmmmmmmmmmmmmimic.net/

    Here is the portion of CSS that designates height for the menu:

    #header {
    position: absolute;
    top: 30px;
    width: 170px;
    left: 1px;
    text-align: right;
    }

    #artwork {
    position: absolute;
    top: 95px;
    width: 170px;
    left: 1px;
    text-align: right;
    }

    #misc {
    position: absolute;
    top: 185px;
    width: 170px;
    left: 1px;
    text-align: right;
    }

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Get rid of the top line in your page, its making IE go into quirks mode.
    You don't need the absolute positioning for the uls, they will move into place since they are inside their own divs.
    Use this for your CSS
    Code:
    /* CSS Document */
    
    body {
    margin: 0;
    padding: 0;
    }
    
    h1 {
     font-family: verdana,arial,sans-serif;
     font-size: 11px;
     color: #333333;
     margin: 0;
     padding: 0;
     text-transform: uppercase;
     font-weight: lighter;
     }
     
    h2 {
     font-family: verdana,arial,sans-serif;
     font-size: 10px;
     color: #4E4D4D;
     margin: 0;
     padding: 0;
     }
     
    a:link    {font-size: 9px; text-decoration: none; color: #666666; font-family: verdana, arial, helvetica, sans-serif;}
    a:visited {font-size: 9px; text-decoration: none; color: #666666; font-family: verdana, arial, helvetica, sans-serif;}
    a:hover   {font-size: 9px; text-decoration: underline; color: #000000; font-family: verdana, arial, helvetica, sans-serif;}
    a:active  {font-size: 9px; text-decoration: underline; color: #000000; font-family: verdana, arial, helvetica, sans-serif;}
    
    ul {
    margin: 0px;
    padding-top: 3px;
    }
    
    li {
    margin: 0px;
    padding: 0px;
    list-style: none;
    }
    
    /* Fix IE. Hide from IE Mac \*/
    * html ul li { float: left; }
    * html ul li a { height: 1%; display:block; line-height:20px; }
    /* End */
    
    #header {
     width: 170px;
     margin-left: 1px;
     margin-top:30px;
     text-align: right;
     }
     
     #artwork {
     width: 170px;
     margin-left: 1px;
     margin-top:5px;
     text-align: right;
     }
      
     #misc {
     width: 170px;
     margin-left: 1px;
     margin-top:5px;
     text-align: right;
     }
    IE has a bug when it comes to vertical lists. I've added in the holly hack. Its the stuff in red. Notice the lists don't have absolute positioning anymore.

  • #3
    New to the CF scene
    Join Date
    Jun 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thanks

    Hey, that was just what I needed. Removing those absolutes was right on. Thanks a ton!

    I ended up liking the nav better without the hack, but I can see where it is useful.

    Which page's top line should be removed?

    The index page's top line:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">

    Or the navigations frame's top line:
    <?xml version="1.0" encoding="iso-8859-1"?> (my guess is it is this one.)

    Would having this (<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">) as top line in index page and this (<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">)
    as top line in the left frame cause browsers to go into quirks mode?

    Thanks Again!

  • #4
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    It should be fine using both of those doctypes. Yes the xml prologue was the line I was talking about the very first line <?xml version="1.0" encoding="iso-8859-1"?>

  • #5
    New to the CF scene
    Join Date
    Jun 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    got it

    Thanks, got it.


  •  

    Posting Permissions

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