- This topic has 14 replies, 3 voices, and was last updated 5 years, 4 months ago by
Sourabh.
-
AuthorPosts
-
November 27, 2020 at 7:20 am #1552540
Sourabh
Hi,
Need CSS Code for creating Drop Down Menus like this –
Refer drop down…
Regds:
November 27, 2020 at 10:24 am #1553061Tom
Lead DeveloperLead DeveloperHi there,
What exactly are you wanting to copy? The arrow?
Typically we only help with theme-related CSS in here, but let me know and I’ll see if it’s a quick thing to help with.
Thanks!
November 27, 2020 at 10:26 am #1553064Sourabh
Its drop down sub menus style…
When u open that site, click on any menu then submenus list will be open.. so that style i want to copy..pls tom help.
November 27, 2020 at 10:33 am #1553083Leo
StaffCustomer SupportSomething like this should help you to get started:
@media (min-width: 769px) { .main-navigation ul.sub-menu { margin-top: 16px; } .main-navigation ul.sub-menu:after, .main-navigation ul.sub-menu:before { bottom: 100%; left: 0; border: solid transparent; content: " "; height: 0; width: 0; position: absolute; pointer-events: none; } .main-navigation ul.sub-menu:before { border-bottom-color: #f2f2f2; border-width: 16px; margin-left: 20px; } }November 28, 2020 at 12:40 am #1554232Sourabh
no its not looking good and same it should be in all GP theme, Refer case study dropdown Section in my secondary header link below –
however i have requested bit different code like below –
(Refer their header and submenu dropdown style)
Do the needful please…
November 28, 2020 at 9:13 am #1555168Leo
StaffCustomer SupportIf you are using the secondary navigation then you need to replace
.main-navigationwith.secondary-navigationin my CSS above.This should be the result:
https://leohsiang.com/debate/As Tom mentioned above, this is as far as we can help with in the support forum here.
If you need further custom coding help, please look into hiring a developer.
November 28, 2020 at 9:18 am #1555175Sourabh
I am Sorry Leo, But I am new and learning from you peoples, So please co-operate.
Thanks:
November 28, 2020 at 9:42 am #1555227Sourabh
Hi,
I changed .main-navigation with .secondary-navigation in your given CSS above, but you cant click on any sub-menu after the drop-down opens, It’s sudden disappear –
Also when sub menus opens that small tone above is a different colour (Its gray, however menus Background is black) so does not look good, how to make it black so that entire sub menu drop should look like same.
Pls support.
November 28, 2020 at 9:43 am #1555233Sourabh
here you can check if you wish (Refer secondary nav) –
November 28, 2020 at 4:41 pm #1555655Leo
StaffCustomer SupportI think my solution would only work with one of the click options for the submenu, can you give that a shot?
https://docs.generatepress.com/article/navigation-dropdown/November 29, 2020 at 1:47 am #1556002Sourabh
Yes tried and working also but here in India peoples are not so smart, so need hover option only?
Because click option works only if u click over down arrow, or if clicking on menu then menu itself refresh, submenus open only after clicking on the small down arrow icon and you need to click again on the small arrow to close this menu, hence only hover option seems fine.
Also, the small pointer of submenu color is still gray, it’s not black completely ??
help if you can…
November 29, 2020 at 10:57 am #1556950Leo
StaffCustomer SupportBecause click option works only if u click over down arrow, or if clicking on menu then menu itself refresh, submenus open only after clicking on the small down arrow icon and you need to click again on the small arrow to close this menu
Try this for the parent menu item:
https://docs.generatepress.com/article/using-the-wordpress-menu-builder/#custom-linkThen you can use the Click – Menu Item option to activate the submenu.
November 29, 2020 at 11:03 am #1556966Sourabh
I have already tried this, using this only I have created sub menus and set a custom class, it did not solve the issue..
If you having a problem creating the requested design CSS, So if you have created CSS for any stylish drop-down submenus then you can share that CSS, if I like I will use the same.
November 29, 2020 at 11:31 am #1557017Leo
StaffCustomer SupportI have already tried this, using this only I have created sub menus and set a custom class, it did not solve the issue..
Not sure if I understand this.
The example in my site (https://leohsiang.com/debate/) is using a custom link as a parent menu item and click – menu item as an option.
That’s the only design I have working, unfortunately.
You can try hiring a developer using a service like https://codeable.io/ to achieve whatever you are looking for.
December 3, 2020 at 7:47 am #1565967Sourabh
No its does not help, leave it then…
-
AuthorPosts
- The topic ‘Need CSS Code’ is closed to new replies.