Support » Theme: Openstrap » Menu Aligning Center

Viewing 5 replies - 1 through 5 (of 5 total)
  • I would also like a solution to this! I tried to change navbar float left to center, it didn’t work. I added !important and it gave no result. Such a simple thing must be easily available. Please, let me know how to do it!

    Moderator Andrew Nevins

    (@anevins)

    Float center isn’t a CSS style, have a little Google around how to center things in CSS… http://www.w3.org/Style/Examples/007/center.en.html

    to center menus I use
    margin-right:auto;
    margin-left:auto;

    but I can’t make it work here, with this template.

    please help!

    .

    (@techievous)

    The theme is based on Bootstrap, a popular front-end framework. You have to take into account Bootstrap’s default styles and eliminate them when customizing.

    Try this code. It’s untested (I don’t have the theme installed) but it should work:

    @media (min-width: 768px) {
    /* overwrite Bootstrap's default styles */
    .navbar .navbar-nav {
      display: inline-block !important;
      float: none !important;
    }
    
    /* centering */
    .navbar .navbar-collapse {
      text-align: center;
    }
    }

    The @media (min-width 768px) {} line tells the web browser to only apply the style when the screen is 768px or higher; thus leaving the mobile layout untouched.

    thank you!!!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Menu Aligning Center’ is closed to new replies.