Tagged: x
-
AuthorPosts
-
February 24, 2017 at 6:59 pm #1384933
SkiutahParticipantHello,
I’m wanting to transform my current Navbar (Header Menu components) to:
- Look more evenly distributed across the top of the site.
- Be more responsive for various screen dimensions (i.e., utilize Flexbox functionality).
I’ve followed this introduction to flexbox as well as this one to learn the basics. I’m wanting to create something similar to the first link’s demonstration of flexbox’s third property,
justify-content: space-around;So far I’ve tried this:
.x-nav-wrap.desktop { display: flex; flex-direction: row; justify-content: space-around; align-items: stretch; }…but nothing happens.
How can I achieve this?
Josh
February 25, 2017 at 5:33 am #1385295
RadModeratorHi Josh,
Thanks for writing in.
Please try this one
.x-nav-wrap.desktop .x-nav { display: flex; flex-direction: row; justify-content: space-between; align-items: stretch; }Cheers!
February 25, 2017 at 11:32 am #1385489
SkiutahParticipantThank you Rad for your reply.
My navbar menu items now stretch the width of the page/container. However, now I cannot get the menu items to center in their respective menus. Instead, they are aligned to the right.
I’ve tried the following code on just the ‘Home’ item to see how to achieve this, but to no avail:
.x-navbar .desktop .x-nav .x-menu-item-402 { display: flex; justify-content: center; flex: 1 1 20%; }How do I center the menu item text in their respective fields and keep flex functionality for them?
February 25, 2017 at 2:45 pm #1385623
SkiutahParticipantBump.
February 25, 2017 at 6:27 pm #1385726
SkiutahParticipantIs there no support on weekends?
February 25, 2017 at 7:24 pm #1385810
RadModeratorHi there,
Please add this CSS as well,
.x-navbar .desktop .x-nav>li { float: none; width: 100%; text-align: center; }Hope this helps.
February 26, 2017 at 10:53 am #1386262
SkiutahParticipantThank you Rad for your reply.
That got it! Much appreciated.
Josh
February 26, 2017 at 11:08 am #1386275
ThaiModeratorIf you need anything else please let us know.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1384933 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
