Center the Menu, when it breaks on a smaller display

edited February 2018 in Menu / Mega menu
Hello betheme,

is there a possibility if someone has a small screen that makes the menu centered?

If the screen is big enough, everything is in the middle, but if the screen is smaller, 3 menu items move to the left side.

Here is a picture:
https://imgur.com/a/D3evJ

But there are not always 3 menu items that jump down, but sometimes only 1 or 2.

The question is, how do I center everything that jumps into the second line?

Website: https://decentralbox.com/

Thank you so much!

Comments

  • Hey,
    this css should work for you. Please disable the autooptimize plugin for the css to work.
    #Top_bar .menu > li {
    display: inline-block !important;
    float:none !important;
    }
    #Top_bar .menu {
    text-align:center !important;
    }
    thanks
  • Hello betheme, the css code works perfect :DDD!! Thank you soo much.

    But i didnt deactivate the autooptimize plugin.
    If the code works, should I disable autooptimize anyway?

    Can problems arise that I do not currently see? Do I even need autoptimize for betheme?

    Best regards, and thank you so much !
  • I just meant that if you are using any cache plugins or you mimify css files then there is a chance that the CSS will not work from the start. If it works then it is fine, but we suggest not using cache or other optimization plugins if you are still creating the website.
  • edited February 2018
    Hello Muffin Support,

    that ist a awesome Support. So fast, wow.

    Okay, thank you for this suggestion, but i always clear cache and autoptimize cache, if i add something new.

    The Website is already created, and only new blog posts and article are new thinks we add. 

    I wish you a nice day, thank 4 helping us

    Best regards from vienna :)
  • Hello Betheme, its me again..

    Your Code works, but now all submenu entrys are also in the middle. Is it possible, that only the mainmenu ist in the middle?

    Website:
    Decentralbox.com
  • Add this css below the previous css
    body #Top_bar .menu  ul {
    text-align:left !important;
    }
    cheers
  • Worked perfect, awesome help :)

    Nice day <3
Sign In or Register to comment.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.