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.