[Resolved] Image on item using mega menu

Home Forums Support [Resolved] Image on item using mega menu

Home Forums Support Image on item using mega menu

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1819624
    Tiago

    Generatepress Theme 3.0.3
    GP Premium: 2.0.2

    I am using mega menu and would like to use an image in one of the menu items.
    I managed to put it using HTML, it was good. But would you like to know how to remove the padding so that the image occupies the entire width of the menu?
    On the link below you can see my need:
    https://www.lojasgraca.com.br/screenshot_24.jpg
    Obs.: I want to apply the possible CSS only on the image item, preserving the style of the rest.
    Thanks.

    #1819655
    Leo
    Staff
    Customer Support

    Hi there,

    Any chance you can link us to the site in question?

    You can use the private information field.

    Let me know πŸ™‚

    #1820123
    Tiago

    Ok. Tanks.

    #1820175
    Leo
    Staff
    Customer Support

    The login link doesn’t work for me:
    https://www.screencast.com/t/SjFoTUvE68

    #1822180
    Tiago

    Hi,
    Try again please, tanks!

    #1822239
    Elvin
    Staff
    Customer Support

    Hi Tiago,

    I’m seeing the same thing as Leo’s.

    If you could temporarily disable the site’s maintenance mode, we won’t need to log in.

    We only need to inspect the menu to check the appropriate CSS selector to target only the image you’ve added as a menu item.

    Let us know. πŸ™‚

    #1822255
    Tiago

    OK,
    Maintenance mode is temporarily disabled.
    Thanks for the feedback.

    #1822267
    Elvin
    Staff
    Customer Support

    OK,
    Maintenance mode is temporarily disabled.
    Thanks for the feedback.

    You can try adding this CSS:

    .main-navigation ul li.menu-item-772 > a {
        padding: 0 !important;
    }

    It removes the padding specifically for the menu item containing the image.

    #1823363
    Tiago

    Worked perfectly! Thanks.
    Would you like to know if you have a link to a CSS assigned to the field? Or is it only possible using the item ID as in the example shown?

    #1823602
    Elvin
    Staff
    Customer Support

    Would you like to know if you have a link to a CSS assigned to the field? Or is it only possible using the item ID as in the example shown?

    I’m not sure I understand what you mean. do you mean to style a menu item depending on what link it points to?

    If so, you can use <a> tag’s href attribute as a selector if you want. See how it’s done here – https://www.w3schools.com/css/css_attribute_selectors.asp

    #1824081
    Tiago

    ok, tanks!

    #1824802
    Elvin
    Staff
    Customer Support

    No problem. πŸ˜€

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