Site logo

[Resolved] Need CSS Code

Home Forums Support [Resolved] Need CSS Code

Home Forums Support Need CSS Code

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #1552540
    Sourabh

    Hi,

    Need CSS Code for creating Drop Down Menus like this –

    Refer drop down…

    Regds:

    #1553061
    Tom
    Lead Developer
    Lead Developer

    Hi 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!

    #1553064
    Sourabh

    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.

    #1553083
    Leo
    Staff
    Customer Support

    Something 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;
        }
    }
    #1554232
    Sourabh

    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…

    #1555168
    Leo
    Staff
    Customer Support

    If you are using the secondary navigation then you need to replace .main-navigation with .secondary-navigation in 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.

    #1555175
    Sourabh

    I am Sorry Leo, But I am new and learning from you peoples, So please co-operate.

    Thanks:

    #1555227
    Sourabh

    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.

    #1555233
    Sourabh

    here you can check if you wish (Refer secondary nav) –

    http://venusentertainments.com/category/case-study/

    #1555655
    Leo
    Staff
    Customer Support

    I 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/

    #1556002
    Sourabh

    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…

    #1556950
    Leo
    Staff
    Customer Support

    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

    Try this for the parent menu item:
    https://docs.generatepress.com/article/using-the-wordpress-menu-builder/#custom-link

    Then you can use the Click – Menu Item option to activate the submenu.

    #1556966
    Sourabh

    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.

    #1557017
    Leo
    Staff
    Customer Support

    I 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.

    #1565967
    Sourabh

    No its does not help, leave it then…

Viewing 15 posts - 1 through 15 (of 15 total)
  • The topic ‘Need CSS Code’ is closed to new replies.