ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Yet another CSS dropdown question for IE

December 01, 2008 6:54pm

Subscribe [2]
  • #1 / Dec 01, 2008 6:54pm

    markwts

    38 posts

    Hi - see what happens with the css dropdowns in IE (7) here? (just rollover some of the main nav tabs and you’ll see what I mean):

    edit: removed reference to site as google indexed it…

    Of course it’s playing nice in FF - just bloody IE!! Any help would be appreciated 😉

  • #2 / Dec 01, 2008 7:55pm

    AnotherMuse

    106 posts

    Adjusting the z-index of the sub-ul should pop it over the top of the content items.

    The other problem, where multiple drop-downs stay visible, I’ve seen before. It’s the javascript, not the CSS, causing it. I don’t know much javascript and can’t remember how we resolved it—possibly some sort of onMouseOut adjustment to the js file.

  • #3 / Dec 01, 2008 10:48pm

    markwts

    38 posts

    Adjusting the z-index of the sub-ul should pop it over the top of the content items.

    The other problem, where multiple drop-downs stay visible, I’ve seen before. It’s the javascript, not the CSS, causing it. I don’t know much javascript and can’t remember how we resolved it—possibly some sort of onMouseOut adjustment to the js file.

    Thanks for the heads up - I tried every number from 1 - 20 (where I left it) within the z-index but made no difference - I think I’ll just have to put an image in it to push the content down a bit so my client can launch…

  • #4 / Dec 02, 2008 12:42pm

    AnotherMuse

    106 posts

    The sub-ul has some sort of positioning defined, right?

    You could try adding it to the sub-li items, again making sure position is defined on them.

  • #5 / Dec 02, 2008 6:48pm

    markwts

    38 posts

    The sub-ul has some sort of positioning defined, right?

    You could try adding it to the sub-li items, again making sure position is defined on them.

    I’m not real good with css to be honest - a developer did all this for us some time ago - am planning to get stuck into some css learning over xmas. But anyway here’s the css code that controls the top-nav and sub-nav - dunno if this helps - thanks for looking at it btw - much appreciated 😉 :

    /* ++++++++++++++  top level ++++++++++++++++ */
    
    
    
    #top-nav {
        position: absolute;
        top: 140px; left: 275px;
        list-style: none;
        text-transform: uppercase;
        font-size: 110%
    }
    
    #top-nav li { 
        position: relative;
        float: left;
        padding-bottom: 2em;
    }
    
    #top-nav a { 
        margin-right: 16px;
        padding-right: 16px;
        color: #005E9D;
        text-decoration: none;
        border-right: 1px solid #005E9D    
    }
    
    #top-nav .last a { 
        margin: 0;
        padding: 0;
        border: none 
    }
    
    #top-nav a:hover { color: #FDB933;}
    
    
    /* submenu */
    
    
    #top-nav li ul {
        position: absolute; 
        z-index: 20;
        top: 2em;
        left: -999em;
        width: 200px;
        list-style: none;
        border-top: 1px solid #fff;
    }
    
    #top-nav ul li { 
        width: 200px;
        padding: 0;
    }
    
    #top-nav li:hover ul, #top-nav li.sfhover ul { left: 0 }
    
    #top-nav li ul a {
        display: block;
        float: none;
        width: 140px;
        margin: 0;     
        padding: 0.5em 10px;
        background: #005E9D;
        border-bottom: 1px solid #fff;
        border-right: 0;
        font-size: 100%;
        color: #fff;
        text-transform: capitalize;
        font-weight: normal;
    }
    
    #top-nav li ul a:hover { background: #FDB933; color: #005E9D; }
  • #6 / Dec 02, 2008 9:05pm

    AnotherMuse

    106 posts

    I would try this:

    #top-nav li:hover ul, #top-nav li.sfhover ul { position: relative; left: 0; z-index: 100; }

    and if that doesn’t work, this:

    #top-nav li ul a:hover { background: #fdb933; color: #005e9d; position: relative; z-index: 100; }

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases