Topic Resolution: Resolved
  • Closed
  • Jackie McHenry
    Spectator
    August 30, 2015 at 5:21 am #20256

    I’d like to center my menu (like header #5) when using header #4 because I need the banner section. I have searched the forum, but can’t seem to find the custom css to do that. Here is site I’m working on: http://strawberrygirldesigns.com/test/

    Thanks!

    Denzel Chia
    Moderator
    Posts: 2656
    August 30, 2015 at 11:05 am #20258

    Hi,

    Please open up alora/framework/headers/header-v4.php
    go to line 2 and find the following codes.

    <div class="header-v4">

    change the number 4 to 5

    <div class="header-v5">

    Screenshot of result. http://prntscr.com/8aifeb

    Thanks!

    Jackie McHenry
    Spectator
    Posts: 13
    August 30, 2015 at 6:55 pm #20262

    Thanks – that worked. 🙂
    Is there not a way to do it with custom css in the theme options panel?
    When I update aloa this fix won’t stay, correct?

    Denzel Chia
    Moderator
    Posts: 2656
    August 31, 2015 at 7:25 am #20271

    Hi,

    Yes, when you update Alora, the fix will not stay.
    You will need to modify it again.

    Yes, we cannot do this using custom css.
    In CSS, if you want to center a div, in this case a nav, you need to enter the width and margin. For example, something like this,

    #nav{
    width:200px;
    margin:0px auto;
    }

    But in this case, if you use a width, it will be fixed.
    When you add a new item to menu, the width of the nav will not be the same, and you will need to adjust the custom css width value again.

    In previous experience, using custom css does not center the menu properly.

    In the case of header-v5, actually there is javascript within the theme to automatically grab values to position the menu in the center of the webpage.

    Modifying the class name is easier that modifying the javascript or custom css.
    In any case, you will need to modify, changing only the class name header-v4 to header-v5 is the easiest way to maintain.

    Thanks!

    Jackie McHenry
    Spectator
    Posts: 13
    August 31, 2015 at 8:15 am #20275

    Thanks Denzel!