-
Johan
Hi!
I have created a mega-menu following this tutorial:
https://snippetclub.com/building-a-mega-menu-with-generatepress-blocks/
Everything works fine as long as I have container links. But when I add a link to my button in the menu “Servicecenter” the button size and font doesnt get the same settings I have set in the button class.I have inspected the code and I really can’t find out why it is happening. Can you give me a hand? 🙂
Best,
Johan -
Johan
Looks like it also overriding my container color on the second grid-block container…
-
Hi there,
Can you try this steps:
1. Clear the cache, then disable cache plugins.
2. Duplicate the block that has the issue and remove the original block, it will generate a new ID for the duplicated block and generate new CSS.
3. If it doesn’t work, go to dashboard > generateblocks > settings, and click Regenerate CSS files.
4. If it still doesn’t work, change the CSS print method to Inline embedding.
Let me know 🙂
-
Johan
Hi!
1. I don’t have any cache plugins, so I didn’t disable any of those 🙂
2. I have rebuilt the element with new css classes system instead, but it won’t pick up the classes.
3. Done.
4. Tried that, didn’t work aswell.Do you want a login to the site to investigate further?
-
Alvind
Hi there,
If you could provide the site login credentials, it would be helpful so we can inspect the issue closely.
-
Johan
Added!
-
Just checked your site again, and it seems the style matches the editor now:
This is what i see https://app.screencast.com/bhEYzvbzvknLV
Let me know 🙂
-
Johan
Hi!
Yup, I got that styling to work but I don’t know what made it work…
But still, the button styling is not working when I add a link to the button. What causes this? -
Alvind
I have inspected the mega menu element, and the styling appears fine with a link added to the button. Is there anything I missed?
-
Johan
Thanks Alvind. Yes, it overrides the font-size on the button when I add a link to the button.
-
Alvind
The font size seems not affected either; it’s
17px
in both the editor and the frontend. -
Johan
Hi!
Not when the link is added.. Look at the attached screenshot. -
David
Hi there,
that ill happen as there are very specific customizer typography styles eg.
.main-navigation .main-nav ul ul li a { line-height: normal; padding: 10px 20px; font-size: 14px; }
and those are more specific then the button styles.
The only simple way to overcome that is to use some CSS to set the buttons styles inside the mega menu eg.
.main-navigation .main-nav .mega-menu .gb-button { font-size: 20px; }
-
Johan
There we got it. Thank you!
-
David
You’re welcome
-
Johan
Hi!
Sorry, but I need to open this again.
Now the CSS in the customizer is overriding a regular a link.
I have this code to get the button text white:.inside-navigation .mega-menu .sub-menu > .menu-item a{ color: var(--white); text-decoration: none !important; }
Now, when I add a regular link I want to be black. How do I fix that?
- You must be logged in to reply to this topic.