Results 1 to 3 of 3

Thread: Horizontal dropdown menu with columns (IE problem)

  1. #1
    Join Date
    Jul 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs down Horizontal dropdown menu with columns (IE problem)

    Would like help or advice on how to fix this menu. It looks perfectly fine in Firefox but in IE.... the dropdown aligns itself to the right of each menu item.

    http://www.siwat.org/portfolio/thaif.../menubar2.html

    Apologies in advance for the CSS mess I'm quite a noob

    /* Start Menu Bar */

    ul.nav,
    .nav ul
    {
    margin:0px;
    padding:7px;
    cursor:default;
    list-style-type:none;
    display:inline;
    font-size:11px;
    font-family:Arial, Helvetica, sans-serif;
    }

    ul.nav
    {
    display:block;
    width:100%;
    }
    ul.nav>li
    {
    display:block;
    float:left;
    position:relative;
    padding:2px 10px;
    }
    /*Hide drop down*/
    ul.nav li>ul
    {
    display:none;
    position:absolute;
    margin-left:2px;
    margin-top:2px;
    }
    /*Show drop down*/
    ul.nav li:hover>ul
    {
    display:block;
    position:absolute;
    background-image:url(../images/tfh_dropdown.png);
    background-repeat:no-repeat;
    background-position:bottom right;
    }

    /*List highlight*/
    .nav ul li a
    {
    display:block;
    padding:5px;
    }

    /*Menu colours*/

    ul.nav,
    .nav ul,
    .nav ul li a
    {
    background-color:#000916;
    color:#fff;
    }


    ul.nav li:hover,
    .nav ul li a:hover
    {
    background-color:#1a3864;
    color:#fff;
    }

    ul.nav li:active,
    .nav ul li a:active
    {
    background-color:#1a3864;
    color:#fff;
    }
    .submenu
    {
    color:#c1d0e3;
    }
    .menutitle
    {
    font-size:12px;
    }
    ul
    {
    float:left;
    list-style:none;
    }
    ul li
    {
    display:block;
    }
    ul li ul li
    {
    display:block;
    }
    li
    {
    margin:5px;
    line-height:15px;
    position:relative; /* For IE */
    }
    /*Columns*/
    .column1
    {
    margin-left:15px;
    width:130px;
    }
    .column2
    {
    margin-left:150px;
    width:130px;
    }
    .column3 {
    margin-left:305px;
    width:200px;
    }
    .column_align1
    {
    margin-top:-120px;
    }
    .column4
    {
    margin-left:15px;
    width:130px;
    }
    .column5
    {
    margin-left:150px;
    width:130px;
    }
    .column_align2 {
    margin-top:-80px;
    }
    Last edited by Babo; 07-04-2008 at 06:08 PM.

  2. #2
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    See if changing your CSS:
    Code:
    ul.nav li>ul{
    /*Make the sub list items invisible*/
    	display:none;
    	position:absolute;
    	/*max-width:40ex;*/
    	margin-left:2px;
    	margin-top:2px;
    }
    to:
    Code:
    ul.nav li>ul{
    /*Make the sub list items invisible*/
    	display:none;
    	position:absolute;
    	/*max-width:40ex;*/
    	left:0px;
    	top:20px;
    }
    proves an aide.

    P.S. When parsing your code in the forum, use the [code][/code] tag and not the [quote][/quote] tag.
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  3. #3
    Join Date
    Jul 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks , tried meddling with that, ended up making 2 CSS files, 1 for IE6+ but was only able to properly align the 1st dropdown into the position I want. The other 2 dropdowns went a bit too far to the left so I changed the column list margins slightly to look more presentable. Would show results but in the middle of uploading to new webhost.

    For Firefox
    Code:
    ul.nav li>ul{
    	display:none;
    	position:absolute;
    	margin-left:-10px;
    	margin-top:2px;
    }
    IE7(no idea how it looks like in IE6 or below!)
    Code:
    ul.nav li>ul{
    	display:none;
    	position:absolute;
    	margin-left:-142px;
    	margin-top:17px;
    }

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
  •