Forums

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

Home Forums CSS Variable lenght centered drop down menus

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #275157
    bistel
    Participant

    I was trying to construct drop-down menus. I wanted them variable length set by text in the first unordered list item. I cannot for the life of me target the hover property to make it match the width. If some can help, I will also take any advice on the best way or better ways to do this. Thanks

    https://jsfiddle.net/bistel/noduymjz/2/

    #275166
    Paulie_D
    Member

    I wanted them variable length set by text in the first unordered list item.

    I’m not quite sure what this means….which first list items…the top level li or the first `li of the submenu

    Either way it seems odd…the menu items should be as wide as they need to be….and separated by margins. You seem to have a lot of extraneous padding and fixed widths in there.

    I’m also not seeing any centering being done….but the first rule of centering is don’t use floats.

    #275167
    Paulie_D
    Member

    Were you going for something like this?

    https://codepen.io/Paulie-D/pen/LBMZKZ

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