Results 1 to 5 of 5

Thread: drop line sub menu wont align under main buttons - please help!

  1. #1
    Join Date
    May 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default drop line sub menu wont align under main buttons - please help!

    Script: Drop Line Menu

    Script URL:
    http://www.dynamicdrive.com/style/cs...line_menu/P10/

    Problem:
    heres the problem:
    http://www.siriussafety.co.uk/TEST/o...nsultants.html
    I'm trying to implement the drop line menu for a website im designing, apart from changing the colour of the buttons and arrows i haven't meddled, but the sub menu when it loads in is offset way to the right of the main menu buttons. I notice that when i reszie the browser window the sub menu appears move back slightly to the left, but not enough.

    Please help! I need to have the sub menu align directly underneath the main buttons as in the example in the link above, but within the site which its shown in the link posted above.
    I'm pretty familiar with css but im more of a designer than a programmer! Would really appreciate some advice on this.
    Thanks! :0)

  2. #2
    Join Date
    Oct 2009
    Posts
    845
    Thanks
    14
    Thanked 189 Times in 188 Posts

    Default

    Not sure if it will work, but you could try to add this in your css:
    Code:
    .droplinebar ul li ul {
    margin-left:-363px;
    }
    But you will also have to lower the z-index in the div#title_text. It has a z-index:200 but you can try to change to 10 or something like this:

    Code:
    div#title_text {
    z-index:10;
    }

  3. #3
    Join Date
    May 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi. Thanks for replying, i've tried that but doesnt seem to have helped.
    I've uploaded the file again with the changes.

    Anyone else have any suggestions - perhaps foolishly ive sold this menu in to my client and if i cant get it to work i'm in trouble!

  4. #4
    Join Date
    Oct 2009
    Posts
    845
    Thanks
    14
    Thanked 189 Times in 188 Posts

    Default

    Hi
    You have this in your css:

    Code:
    .droplinebar ul li ul{
    position: absolute;
    margin-left:-365;
    z-index: 1000;
    top: 0;
    left: 0;
    float: left; /* i added this*/
    background: #ffffff; /*sub menu background color */
    visibility: hidden;
    }
    Try to add px to the -365 like this:

    Code:
    .droplinebar ul li ul{
    position: absolute;
    margin-left:-365px;
    z-index: 1000;
    top: 0;
    left: 0;
    float: left; /* i added this*/
    background: #ffffff; /*sub menu background color */
    visibility: hidden;
    }
    I would expect that to help.

  5. #5
    Join Date
    Oct 2009
    Posts
    845
    Thanks
    14
    Thanked 189 Times in 188 Posts

    Default

    Okay there is still a problem when the browser is resized. I get a better result with this:
    Code:
    .droplinebar ul li ul{
    position: absolute;
    z-index: 1000;
    margin-left:-250px;
    left:50% !important;
    top: 0;
    background: #ffffff; /*sub menu background color */
    visibility: hidden;
    }
    Had to use !important to override some inline css

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
  •