- This topic has 19 replies, 3 voices, and was last updated 3 years, 1 month ago by
David.
-
AuthorPosts
-
February 23, 2023 at 5:28 am #2543898
Jusung
Hello. I am trying to make mega menu by following the instruction on the documentation.
However, when I added the code, it doesn’t work.
Can I make a mega menu for 서비스?
February 23, 2023 at 7:20 am #2544004David
StaffCustomer SupportHi there,
did you add the classes to the menu items as explained in the docs:
https://docs.generatepress.com/article/building-simple-mega-menu/
February 23, 2023 at 4:41 pm #2544689Jusung
I added CSS, but it doens’t work as shown on the documentation.
February 23, 2023 at 7:04 pm #2544795Fernando Customer Support
Hi Jusung,
Have you added the classes as instructed here?: https://docs.generatepress.com/article/building-simple-mega-menu/#:~:text=Now%20that%20our%20structure%20is%20built%2C%20open%20the%20main%20parent%20item%2C%20and%20give%20it%20the%20mega%2Dmenu%20class.
Make sure you have the correct structure as instructed in the article as well.
I can’t seem to see them.
February 23, 2023 at 7:21 pm #2544803Jusung
I just added it to parent. I was giving to child menu.
but it doesn’t look right.
I tried to remove the CSS that was added to the menu, but it doesn’t look as expected.
February 23, 2023 at 8:45 pm #2544836Fernando Customer Support
I think you’re still missing a class. Try adding this class:
mega-menu-col-4If that doesn’t work, can you go through the entire article one more time and make sure you didn’t miss a step?
February 23, 2023 at 10:13 pm #2544893Jusung
It doens’t work.
As far as I understand, I only have to add the css to the parent menu.
I first added mega-menu cuz it said showing 4 as a default.
Now, I added
mega-menu mega-menu-col-4
, but it doens’t work at all..February 23, 2023 at 10:53 pm #2544925Fernando Customer Support
You have other code working on your menu. The Mega menu is ideal for menus that aren’t customized yet.
For instance, you have this code that’s conflicting with the mega menu code:
div#primary-menu ul.sub-menu { width: 200px; text-align: center; }You’ll need to remove previous code you have that are causing a conflict.
February 24, 2023 at 12:08 am #2544990Jusung
Yeah I removed it.
I also removed this one.
.main-navigation .main-nav > ul > li {
position: relative;
}Then the mega menu works.
I don’t understand what the “position: relative;” is for.
Is it ok to remove this code?February 24, 2023 at 12:17 am #2545002Fernando Customer Support
With that code, does the Mega menu not work?
That code is for the line divider I believe.
February 24, 2023 at 4:30 am #2545313Jusung
I removed “position: relative;” . I am not sure if this would be ok.
When I remove this, the mega menu works.Also, can I move the mega menu on the right side?
February 24, 2023 at 9:46 am #2545784David
StaffCustomer SupportTo align it to right.
Change this CSS:nav .main-nav .mega-menu > ul { position: absolute; width: 60%; left: 0 !important; display: flex; flex-wrap: wrap; }To this:
nav .main-nav .mega-menu > ul{ position: absolute; width: 760px; left: unset !important; display: flex; flex-wrap: wrap; right: 0; }February 24, 2023 at 10:35 am #2545831Jusung
Yes It works!
but the child item becomes white. I want to make it black when hover color.
Also, I want to increase the text size of grandchild item to 20px;.
February 25, 2023 at 4:00 am #2546366David
StaffCustomer SupportTry this CSS:
nav .main-nav .mega-menu>ul>li>a { color: #f00 !important; }And for the font size, you can set that in the customizer typography or use this CSS:
.main-navigation .main-nav ul ul li a { font-size: 20px !important; }February 25, 2023 at 6:44 am #2546488Jusung
.main-navigation .main-nav ul ul li a {
font-size: 20px !important;
}for this code, I only wanna change the size of grand child item.
But with this code, it changes child item.Is there a way to change only grand child item size?
Also, I wanna give left padding to grand child items on mobile device. -
AuthorPosts
- You must be logged in to reply to this topic.