-
AuthorPosts
-
July 22, 2014 at 12:50 am #199871
What CSS should I place in the custom.css file to center the nav menu? The bonus menu pulls to the left. I want to center it. Has anyone ran across this? I tried setting the follwing:
.nav-categories {
font-size: 1.5em;
}.navbar-nav {
margin-right: 25%;
margin-left: 25%;
}That worked at first. However, when the screen is resized the nav links begin to stack instead of shrink and remain center until collapse.
Nazario A FriendNazario A
- Join date:
- April 2013
- Posts:
- 1183
- Downloads:
- 0
- Uploads:
- 406
- Thanks:
- 91
- Thanked:
- 284 times in 263 posts
July 22, 2014 at 9:21 am #543104Please open file: /templates/your_template_name/css/custom.css then add this rule:
.t3-navbar.navbar-collapse.collapse {
padding-right: 200px;
text-align: center;
}
.navbar-nav {
float: none;
}
.nav > li {
display: inline-block;
float: none;
}Let me know if this helps
March 23, 2015 at 9:46 pm #564308Thank you Nazario A for your solution. I’ve added the code above to the custom.css and it centered Bonus menu great. But it also centered the drop down submenu π Do you know how to leave it left aligned? And I have a question about Bonus menu – as I have it center aligned (but it had the same behavior when it was left aligned) – when I’m on the homepage the Bonus menu starts in some specific point but when I’m on the other pages (eg. items from Bonus menu) the Bonus menu moves to the right a little bit (20px?). You can take a look here. Could you, please, help me with this issue? Thank you!
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
March 24, 2015 at 8:02 am #564377Hi Ninja Lead, I have Bonus menu on the top of the pages – I moved it from its default position to the very top. Please look at it here again. And what I found out right now is that this code affected not only drop-down submenu (as I wrote above) but also my modules Starsovstvo and Kazatel CB Liberec (they were centered before and now are left aligned :-(). You’ve helped me with centering these modules π
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
March 24, 2015 at 2:57 pm #564431March 25, 2015 at 9:20 am #564533Hi Ninja Lead,
yes, you are right π But as I wrote above<blockquote>it centered Bonus menu great. But it also centered the drop down submenu π Do you know how to leave it left aligned? </blockquote>
I don’t want to have drop down submenu centered, but left aligned π That is why I’m asking for help. And as I wrote above:
<blockquote>And what I found out right now is that this code affected not only drop-down submenu (as I wrote above) but also my modules Starsovstvo and Kazatel CB Liberec (they were centered before and now are left aligned :-().</blockquote>
Modules Starsovstvo and Kazatel CB Liberec I want to center – and I had it before I added the code for centering Bonus menu. After I added this code for centering Bonus menu, my modules (Starsovstvo and Kazatel CB Liberec) moved to the left where I don’t want them.
And the last question as I wrote above:
<blockquote>And I have a question about Bonus menu – as I have it center aligned (but it had the same behavior when it was left aligned) – when I’m on the homepage the Bonus menu starts in some specific point but when I’m on the other pages (eg. items from Bonus menu) the Bonus menu moves to the right a little bit (20px?). You can take a look here. Could you, please, help me with this issue? Thank you!</blockquote>
Thank you very much!
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
March 26, 2015 at 4:58 am #564632You can fix it with the solution below
Open templates/ja_appolio/css/custom.css file
find and change
.t3-navbar.navbar-collapse.collapse {
padding-right: 200px;
text-align: center;
}.t3-navbar.navbar-collapse.collapse {
padding-right: 200px;
}@media (min-width: 1200px) {
.t3-mainnav .container {
width: 50%;
margin: 0 auto;
}
}Hope it helps
March 26, 2015 at 9:28 pm #564749Unfortunately the code youΒ΄ve gave me split Bonus menu to 2 rows that are not even centered π But the drop-down submenu is now left aligned π See picture
Modules Starsovstvo and Kazatel CB Liberec are centered π
Please can you help?
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
March 27, 2015 at 2:51 am #564776Try to remove css style below in custom.css file
.t3-navbar.navbar-collapse.collapse {
padding-right: 200px;
}
March 27, 2015 at 10:24 am #564833Now it helped with 2 rows, itΒ΄s again 1 row menu.
But menu is not centered π Its closer to the right and when I change the size of the browser Search box hides the closest menu items. You can take a look.
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
March 30, 2015 at 3:09 am #565005You can try again with my tweak below:
Open custom.css file and add new rule
.t3-megamenu .level0 {
text-align: center;
}.t3-megamenu .mega-nav > li a, .t3-megamenu .dropdown-menu .mega-nav > li a, .t3-megamenu .dropdown-menu .mega-nav > li .separator {
text-align: left;
}
March 30, 2015 at 9:08 am #565044Thank you, Ninja Lead. It didn’t help. I put the code above and it looks in a similar way. You can look on the page or look here on screenshot:
It’s still shift more to the right then exactly in the middle and in some point (as you can see on the pict) is menu divided to two rows even there is still enough place to move an stay on the one row.
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
March 31, 2015 at 4:50 am #565150I just fixed that bug directly on your site, please help me check it again and you can see it from custom.css file
.t3-navbar.navbar-collapse.collapse {
padding-right: 200px;
text-align: center;
}.navbar-nav {float: none;}
.nav > li { display: inline-block;
float: none;
}.t3-megamenu .level0 {
text-align: center;
}.t3-megamenu .mega-nav > li a, .t3-megamenu .dropdown-menu .mega-nav > li a, .t3-megamenu .dropdown-menu .mega-nav > li .separator {
text-align: left;
}
@media (min-width: 768px) and (max-width: 1024px) {
.head-search .form-control {
width:100px;
}
}
@media (min-width: 1400px) {
.t3-navbar.navbar-collapse.collapse {
padding-right: 0px;
}
}
1 user says Thank You to Ninja Lead for this useful post
March 31, 2015 at 8:27 am #565179Thank you, Ninja Lead. It works and is great π
AuthorPostsThis topic contains 20 replies, has 4 voices, and was last updated by karca 9 years, 7 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Jump to forum