-
AuthorPosts
-
February 1, 2014 at 3:42 am #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.
So how can I make that smaller container the entire width?
February 1, 2014 at 3:45 am #217704This reply has been marked as private.February 1, 2014 at 7:31 am #217716Hey!
Have you tried using the selector “#header_main_alternate”? Apply the css code above on that selector.
Best regards,
IsmaelFebruary 1, 2014 at 7:39 am #217718Yes 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.February 1, 2014 at 10:35 am #217744Hi!
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!
PeterFebruary 2, 2014 at 9:30 pm #218513That 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
February 3, 2014 at 10:45 am #218708Hi!`
No, the solution seems to be ok for me :)
Cheers!
Peter -
AuthorPosts
- The topic ‘Make menu div full width of container?’ is closed to new replies.