Celebrating 7 Years! Get up to $30 off GeneratePress Premium!

[Support request] Center menu in header?

Home Forums Support [Support request] Center menu in header?

Home Forums Support Center menu in header?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #527876
    Olle

    I’m trying to do a simple header with a nav centered horizontally in it. Why is it not any option for that? Only “above header” and “below header” but that is putting it outside the header. Float left or right in header but no center option.
    I have an example here http://mertzig2.karneman.com/ this is done by giving #site-navigation a width and margin auto. But not so good for obvious reasons. Do I have to use Flexbox?
    I can’t believe that such a simple option is not in the settings. What am I missing?

    Regards
    Olle

    #528257
    Tom
    Lead Developer
    Lead Developer

    The way you’ve set it up there is how I would suggest doing it.

    There’s not an option as it hasn’t been requested very often. In most cases people just disable the header and center align the navigation. Doing that renders a very similar layout.

    #528269
    Olle

    Yeah but it’s not very flexible and not responsive.
    So if I start with a logo and a menu and then decide of removing the logo from the menu.
    My option is to rebuild the menu? CSS and all. To be on top or below the header?

    It would not be so hard for you to include a centering option for the menu in the header.
    Makes your theme more flexible. How many people that have made the request is irrelevant I think. You don’t make the theme based only on requests. But rather on flexibility an user experience an simplicity for the user.

    Regards
    Olle

    #528795
    Tom
    Lead Developer
    Lead Developer

    I’m not sure I understand the first question. Why would you need to rebuild the menu?

    Every option we build into the theme adds more bloat. More options means more code, which everyone has to load. So if we add an extra 30 lines of CSS (for example), every single website using GP has to load that code.

    That’s why it’s important we only add options that the majority of users will find useful. Otherwise GP would turn into another theme forest theme very quickly. GP has been popular for over 4 years and it’s still lightweight – keeping options to a minimum is the reason for that.

    #529036
    Olle

    With all the respect. In this case it’s only about two lines of CSS not 30.
    Change the .inside-header to inline-block and text-align:center; And then #site-navigation to float:none;

    I don’t think it adds to the theme being bloated. It just makes it more flexible and better.

    Regards
    Olle

    #529331
    Tom
    Lead Developer
    Lead Developer

    Unfortunately there’s quite a bit more involved than just that. Options need to be added, PHP for classes need to added.

    If it’s requested more, I’ll absolutely consider it 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.