Forums

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

Home Forums CSS Having problem with submenu in twenty-ten

  • This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #40732
    preitybansal
    Member

    Hi all,

    I am facing some problem with the submenu positioning in my site.
    the site url is http://ilelo-creation.info/wara-chaussure/la-marque/
    When I hover over the menu collection a submenu appears calles sample..
    It shoud appear just at the right side after the block ends but it is appearing before.

    I know it is getting adjust with left: 100% and top: 0, but dont know why left: 100%; is not taking its full width.

    Any help will be appreciated. Need it urgently.

    Thanks a lot

    #113953
    Paulie_D
    Member

    The problem appears to be that all the submenu items have different widths defined by their content.

    Try this:

    #menu1 ul ul li {
    width:100%;
    text-align:left;
    }

    #113993
    preitybansal
    Member

    @ Paulie_D

    Thanks a lot.. It works…but may I know the logic behind this code as I didnt get how it worked…
    Want to learn more…

    #113998
    Paulie_D
    Member

    Basically, if you don’t set a width to your list items they will only be as wide as they need to be to hold the content.

    So an li with “Management” will be wider than one for “Home”. Then any li’s that are their children are positioned absolutely and so they follow on immediately rather than waiting for the parent menu to finish.

    By setting all the li to a width of 100% they will all inherit the maximum width and thus be the same width and the children all appear lined up accordingly.

    Obviously, the width of 100% may be too much so it can be reduced (either to a lower % or an actual px value) if your submenu items don’t need all that space.

    #114006
    preitybansal
    Member

    Thanx Paulie_D for the information you gave..
    May I know that are you a developer or designer? I usually have issues with wordpress functionality and css designing as I am in learning phase, so I can get in touch with you and obviously pay you for your help.

    Please let me know what do you think..

    Thank you

    Preity

    #114010
    Paulie_D
    Member

    Frankly I an neither. Just an ‘informed’ amateur who maintains a few sites for a couple of companies.

    On WP I have zero experience. I do maintain a Drupal site though.

    #114013
    preitybansal
    Member

    Hmm it is fine…
    But really glad to come across such a nice person who helps others such as me who really need someone to guide them.

    If you have html/css experience then also I may need your help at times..

    Have a nice day.. :)

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