- This topic has 11 replies, 3 voices, and was last updated 4 years, 9 months ago by
Elvin.
-
AuthorPosts
-
June 12, 2021 at 6:46 am #1819624
Cooperativa CERTAJA Desenvolvimento
Generatepress Theme 3.0.3
GP Premium: 2.0.2I 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.June 12, 2021 at 7:15 am #1819655Leo
StaffCustomer SupportHi there,
Any chance you can link us to the site in question?
You can use the private information field.
Let me know 🙂
June 12, 2021 at 4:29 pm #1820123Cooperativa CERTAJA Desenvolvimento
Ok. Tanks.
June 12, 2021 at 8:24 pm #1820175Leo
StaffCustomer SupportThe login link doesn’t work for me:
https://www.screencast.com/t/SjFoTUvE68June 14, 2021 at 4:16 pm #1822180Cooperativa CERTAJA Desenvolvimento
Hi,
Try again please, tanks!June 14, 2021 at 7:21 pm #1822239Elvin
StaffCustomer SupportHi 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. 🙂
June 14, 2021 at 7:56 pm #1822255Cooperativa CERTAJA Desenvolvimento
OK,
Maintenance mode is temporarily disabled.
Thanks for the feedback.June 14, 2021 at 8:22 pm #1822267Elvin
StaffCustomer SupportOK,
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.
June 15, 2021 at 12:39 pm #1823363Cooperativa CERTAJA Desenvolvimento
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?June 15, 2021 at 7:54 pm #1823602Elvin
StaffCustomer SupportWould 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.aspJune 16, 2021 at 6:36 am #1824081Cooperativa CERTAJA Desenvolvimento
ok, tanks!
June 16, 2021 at 7:29 pm #1824802Elvin
StaffCustomer SupportNo problem. 😀
-
AuthorPosts
- You must be logged in to reply to this topic.