Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS [Solved] IE7 dropdown menu problems

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #27447
    mgdmedia
    Member

    Can anyone help me?
    I can get my menu to work in all browsers except ie7.
    In ie7 all of the menu items shift to the left and stack on top of one and other.

    The page is here…
    http://www.erdengines.com/newsite/

    Here is a sample image of what is happening…
    [img]http://www.erdengines.com/ie7.jpg[/img]

    Here is the code I am using…

    Code:
    .menu {background: url(images/carbon-bg.jpg); min-height:30px; position:relative; z-index:100; border-right:1px solid #000; font-family: Arial, Helvetica, sans-serif;}
    /* hack to correct IE5.5 faulty box model */
    * html .menu {}
    /* remove all the bullets, borders and padding from the default list styling */
    .menu ul {padding:0;margin:0;list-style-type:none;}
    .menu ul ul { display: inline; }
    /* float the list to make it horizontal and a relative positon so that you can control the dropdown menu positon */
    .menu li {display:inline; float:left; position:relative;}

    /* style the links for the top level */
    .menu a, .menu a:visited {display:inline;display:block;font-size:13px;text-decoration:none; white-space:nowrap; color:#fff; height:30px; border:1px solid #000; border-width:0px 0 1px 1px; padding-left:10px; padding-right: 10px; line-height:29px;}
    /* a hack so that IE5.5 faulty box model is corrected */
    * html .menu a, * html .menu a:visited {}

    /* hide the sub levels and give them a positon absolute so that they take up no room */
    .menu ul ul {visibility:hidden;position:absolute;height:0;top:31px;left:0; width:149px;border-top:1px solid #000;}
    /* another hack for IE5.5 */
    * html .menu ul ul {top:30px;top:31px;}

    /* position the third level flyout menu */
    .menu ul ul ul{left:149px; top:-1px; width:149px;}

    /* position the third level flyout menu for a left flyout */
    .menu ul ul ul.left {left:-149px;}

    /* style the table so that it takes no part in the layout – required for IE to work */
    .menu table {position:absolute; top:0; left:0; border-collapse:collapse;}

    /* style the second level links */
    .menu ul ul a, .menu ul ul a:visited {background: url(menu_wht-bg.png); color:#000; height:30px; line-height:29px; padding-left:5px; padding-right: 20px; width: auto;border-width:0 1px 1px 1px;}
    /* yet another hack for IE5.5 */
    * html .menu ul ul a, * html .menu ul ul a:visited {}

    /* style the top level hover */
    .menu a:hover, .menu ul ul a:hover{color: #FF0; background: url(menu-bg.png);}
    .menu :hover > a, .menu ul ul :hover > a {color: #FF0; background: url(menu-bg.png);}

    /* make the second level visible when hover on first level list OR link */
    .menu ul li:hover ul,
    .menu ul a:hover ul{visibility:visible; }
    /* keep the third level hidden when you hover on first level list OR link */
    .menu ul :hover ul ul{visibility:hidden;}
    /* make the third level visible when you hover over second level list OR link */
    .menu ul :hover ul :hover ul{ visibility:visible;}

    #69058
    mgdmedia
    Member

    Solved it myself, thanks!

    #70266
    Hrvojeee
    Member

    Well don’t be a prick and share Your resolution! I have the same problem

    #70270
    Hrvojeee
    Member

    Thanks for the effort "virtual" but yes, thats not my solution! i’ll have to open another thread!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.