Site logo

[Resolved] Is there a way I can set a max width for a single submenu item?

Home Forums Support [Resolved] Is there a way I can set a max width for a single submenu item?

Home Forums Support Is there a way I can set a max width for a single submenu item?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #731887
    Piet Hein

    Hi guys,

    I’ve installed WPML plugin on my website to translate. When you hover over the flag in the top corner of the main menu, the English or Dutch flags shows as a submenu item.

    However, the submenu item is very wide – small flag, wide green background, doesn’t look good. (I don’t know if this makes sense, but you’ll understand if you look on the background.)

    I want to fix this by (preferably) setting a max width to this particular menu item, (there are other submenu items that do need the normal width) or by making the background transparent.

    However, I don’t know how to do this. I can change the colour, but when I set it to transparent it remains green. Is there a smart way to do this, or should I set the colour of all submenu background items to transparent, and then add the colour green to the ones that need the colour?

    Kind regards,

    Piet

    #731969
    David
    Staff
    Customer Support

    Hi there,

    try this CSS:

    .main-navigation li.wpml-ls-menu-item > ul {
        width: auto;
    }
    #731988
    Piet Hein

    Thanks, David.

    Works like a charm.

    Cheers,

    Piet

    #732003
    David
    Staff
    Customer Support

    Glad i could help

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.