ThemeShaper Forums » Thematic

[closed]

Trouble with dropdowns in Thematic

(10 posts)
  • Started 2 years ago by meevil
  • Latest reply from meevil
  • This topic is not resolved
  1. Hi guys and gals, having a bit of trouble with thematic at the moment!

    Here's my problem:

    http://i.imgur.com/cFJxi.png

    As you can see, after centering my menu, my dropdown function has just ceased to work!

    Here's my code:

    /* =Menu
    -------------------------------------------------------------- */

    .skip-link {
    display:none;
    }
    #access {
    height:115px;
    font-size:13px;
    overflow:visible;
    z-index:100;
    }

    .menu{
    text-align: center;
    font-family: 'Arial Black', Gadget, sans-serif;
    color: #FFF;
    text-shadow: 1px 1px 2px #858585;
    filter: dropshadow(color=#858585, offx=1, offy=1);
    }

    .sf-menu{float: none;}

    .sf-menu li{display: inline; float: none;}

    .sf-menu a{display:inline-block;}

    #access{width: 960px; height: 60px; margin: 0px auto;}

    /*** ESSENTIAL STYLES ***/
    }
    .sf-menu {
    line-height: 1.0;
    }
    .sf-menu ul {
    position: absolute;
    top: -1000em;
    width: 2.5em; /* left offset of submenus need to match (see below) */
    }
    .sf-menu ul li {
    width: 100%;
    }
    .sf-menu li:hover {
    visibility: inherit; /* fixes IE7 'sticky bug' */
    }

    .sf-menu li:hover ul,
    .sf-menu li.sfHover ul {
    left: 0;
    top: 2.5em; /* match top ul list item height */
    z-index: 99;
    }
    ul.sf-menu li:hover li ul,
    ul.sf-menu li.sfHover li ul {
    top: -999em;
    }
    ul.sf-menu li li:hover ul,
    ul.sf-menu li li.sfHover ul {
    left: 2.5em; /* match ul width */
    top: 0;
    }
    ul.sf-menu li li:hover li ul,
    ul.sf-menu li li.sfHover li ul {
    top: -999em;
    }
    ul.sf-menu li li li:hover ul,
    ul.sf-menu li li li.sfHover ul {
    left: 2.5em; /* match ul width */
    top: 0;
    }

    /*** THEMATIC SKIN ***/
    .sf-menu {
    margin:0 auto;
    float:left;
    width: 955px;
    background: #000;
    border-style:outset;
    border-width:3px;
    border-color:#CCCCCC;
    -webkit-border-radius: 5px;
    -moz-border-radius: 5px;
    border-radius: 5px;
    }
    .ie6 .sf-menu {
    margin-bottom: -1px;
    }
    .sf-menu a {

    border-top:1px solid #000;
    border-bottom:1px solid #000;
    padding:9px 13px;
    text-decoration:none;
    }
    .windows .sf-menu a {
    font-size: 12px;
    padding:9px 13px 10px;
    }
    .sf-menu .current_page_item a,
    .sf-menu .current_page_ancestor a,
    .sf-menu .current_page_parent a {
    border-bottom-color:#fff;
    }
    .sf-menu a, .sf-menu a:visited { /* visited pseudo selector so IE6 applies text colour*/
    color: #FFF;
    }
    .sf-menu li {
    }
    .sf-menu li li {
    }
    .sf-menu li li li {
    }
    .sf-menu li:hover, .sf-menu li.sfHover,
    .sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active {
    outline: 0;
    color: #CCCCCC;
    }
    .sf-menu ul {
    border-right:1px solid #ccc;
    border-bottom:1px solid #ccc;
    }
    .sf-menu li:hover ul,
    .sf-menu li.sfHover ul {
    top:32px; /* overriding essential styles */
    }
    .sf-menu ul ul {
    margin-top:0;
    }
    .sf-menu ul a {
    background:#fafafa;
    border-bottom:none;
    }
    .sf-menu ul a:hover {

    }

    It's probably also worth mentioning that the "tabs" above the standard navigation are also calling the "menu" class.

    Hope you guys can help, I'm stumped!

    Posted 2 years ago #
  2. do you really expect us to read your code and figure it out? how about a link? a picture is worth a thousand words after all.

    Posted 2 years ago #
  3. Sorry, code was for reference!

    There's an image at the top, but here's a link to my test site:

    test.nfortress.com

    username - "jontron"

    password - "supersecret1987"

    Posted 2 years ago #
  4. middlesister
    Member

    You need to add position:relative to the #menu-main, so the placing of the dropdown menu will refer to that #menu-main ul instead of the parent #access div.

    Posted 2 years ago #
  5. Thanks Middlesister. That sort of worked, it's now on the same X axis as the dropdown but is still on the same Y axis...

    I'm so confused by this!

    Posted 2 years ago #
  6. i'm confused, b/c you seem to have 2 menus?

    have you read my mega menu thread?
    http://forums.themeshaper.com/topic/thematic-menus-demystified-1#post-15291

    Posted 2 years ago #
  7. Yea I have two menus, sharing similar code but different classes. Could that be what's messing this up?

    Thanks for that thread Helga! I'll try hardcording my own.

    Posted 2 years ago #
  8. middlesister
    Member

    I'm not really sure what you mean. Do you want the dropdown centered as well?

    That really needs some css trickery I think. Usually you can center elements using "margin:0 auto" but the dropdown is positioned absolutelty so that won't work here. Maybe make the dropdown ul 100% width? I think you would need to put a width on the submenu li's in that case to make them all the same length.

    Posted 2 years ago #
  9. 2 menus that are the same? that doesn't make much sense to me....you'd need some jquery ninja skills to make hovering on the one trigger the appropriate dropdown on the other. i think you need to try the approach i linked you to.

    Posted 2 years ago #
  10. Yea... God knows why I've made such a mess of this :/

    Thanks for the help though guys!

    Posted 2 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.