Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #217703

    Hey guys,

    I’ve been trying to figure this one out, but not sure how to do it.

    Basically when the menu is NOT sticky it should be white. When it is sticky it should be (let’s say) blue.
    And it should fade. I was able to do this so far, but when the menu is not sticky the fade looks bad since the menu container is not the full width of the main container (if that makes sense)

    Just look and you will see what I mean. Scroll down and it will fade to a color. then scroll back up and it will fade back to white, but here is where the container is smaller so the outer sides will immediately turn white.

    onecraftyshop.com

    So how can I make that smaller container the entire width?

    #217704
    This reply has been marked as private.
    #217716

    Hey!

    Have you tried using the selector “#header_main_alternate”? Apply the css code above on that selector.

    Best regards,
    Ismael

    #217718

    Yes I tried that, but it doesn’t work. It still doesn’t fade it just appears white immediately.

    Any way we can get this working would be great!
    So either, make the container full width (I’ll worry about positiong and all the small details)
    or
    make #header_main_alternate fade like the rest of it.

    #217744

    Hi!

    You can extend the width with following code

    
    .responsive #top #header_main_alternate .container {
    width: 100% !important;
    }
    
    .responsive #top #header_main_alternate .container .main_menu {
    width: 1030px;
    float: none;
    margin: auto;
    }
    

    Cheers!
    Peter

    #218513

    That didn’t work for me, possible because I have UberMenu as my menu now??
    But I did manage to get what I want by editing the header.php and changing

      <div class='container'>
    
                            <?php
                            /*
                            *	display the theme logo by checking if the default logo was overwritten in the backend.
                            *   the function is located at framework/php/function-set-avia-frontend-functions.php in case you need to edit the output
                            */
                            echo avia_logo(AVIA_BASE_URL.'images/layout/logo.png', false, 'strong');
    
                                if(strpos($headerS,'social_header') !== false && strpos($headerS,'bottom_nav_header') !== false) avia_social_media_icons($social_args);
    
                            /*
                            *	display the main navigation menu
                            *   modify the output in your wordpress admin backend at appearance->menus
                            */
                                $extraOpen = $extraClose = "";
                                if(strpos($headerS,'bottom_nav_header') !== false){ $extraClose = "</div></div><div id='header_main_alternate' class='container_wrap'><div class='jrm_container'>";  }
    

    Notice at the very end I have “jrm_container” instead of just “container” Then I added the following css:

    .jrm_container {
      position: relative;
      margin: 0 auto;
      padding: 0px;
      clear: both;
    }

    That way the width takes up the entire width of the parent container.

    Do you see any issues with this way of doing things? I created my own cusotm “container” to avoid any potential issues like other divs having the container class.

    thanks

    #218708

    Hi!`

    No, the solution seems to be ok for me :)

    Cheers!
    Peter

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Make menu div full width of container?’ is closed to new replies.