Center menu in home page

Hi,i need the CSS to center my menu only on the homepage(id 16)

Thanks!

Hi,

You can center your menu only on your homepage with this Custom CSS:

.home .site-header .col-md-4.col-sm-8.col-xs-12 {
    display: none !important;
}

.home .header-wrap .col-md-8.col-sm-4.col-xs-12 {
    width: 100% !important;
    text-align: center;
}

#mainnav {
    text-align: center !important;
    float: none !important;
}

#mainnav li {
    display: inline-block !important;
    float: none !important;
}

Please add the above CSS to your Child Theme’s style.css or in case you haven’t setup a Child Theme already, then you can also add the CSS to wp-admin -> Appearance -> Customizer -> Additional CSS so you won’t loose the changes after Theme or WordPress updates.

Please let me know how it works.

Best Regards,
Csaba

Worked like a charm!

Thank you!

Hi,

Great! You’re most welcome! If you need help with anything else, please, feel free to open a new topic.

Have a nice day!

Best Regards,
Csaba