Center gkMainMenu

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Mon Sep 01, 2014 4:52 am
Reply with quote
Report this post
Is there any way to have the gkMainMenu be centered in the gkTopNav position instead of aligned to the left?

Thanks in advance.
User avatar
Junior Boarder

GK User
Mon Sep 01, 2014 8:53 am
Reply with quote
Report this post
Are you sure that this is news 2 template question?
User avatar
Moderator

GK User
Mon Sep 01, 2014 2:50 pm
Reply with quote
Report this post
..Yes? Why wouldn't it be?
User avatar
Junior Boarder

GK User
Mon Sep 01, 2014 3:34 pm
Reply with quote
Report this post
Edit: Was able to figure it out, so disregard.
User avatar
Junior Boarder

GK User
Mon Sep 01, 2014 6:40 pm
Reply with quote
Report this post
Ok, could you share the solution and link to your site?
User avatar
Moderator

GK User
Tue Sep 02, 2014 9:35 pm
Reply with quote
Report this post
The site isn't currently publicly visible, but I was able to center the menu items by adding the following code to override.css

Code: Select all
.gkMenu>ul>li>a {
    border-right: none;
    color: #222;
    display: block;
    height: 54px;
    line-height: 55px;
    padding: 0 32px;
}

#gkTopNav {
    height: 55px;
    margin-left: auto;
    margin-right: auto;
    width: 70%;
}


I made a few other changes (centering the logo and changing the borders), so the result is the following:

Image
User avatar
Junior Boarder

GK User
Wed Sep 03, 2014 2:01 am
Reply with quote
Report this post
Edit: In order for this to work responsively, I had to amend the above code slightly (feel free to remove it):

Code: Select all
.gkMenu>ul>li>a {
    border-right: none;
    color: #222;
    display: block;
    height: 54px;
    line-height: 55px;
    padding: 0 32px;

* Centers the TopNav */
#gkTopNav {
   height: 55px;
   margin-left: auto;   
   margin-right: auto; 
}
@media (max-width: 1280px) {
#gkTopNav {
width: 70%;

}
User avatar
Junior Boarder

GK User
Wed Sep 03, 2014 4:29 pm
Reply with quote
Report this post
Ok, thanks for sharing.
Its awesome that you are using override.css :)
User avatar
Moderator


cron