Main Navigation Menu > How to Make Fixed Position?
Beautiful and responsive WordPress theme with amazing parallax effect.
- GK User
- Tue May 10, 2016 3:00 am
Does anyone know the proper css to make the main navigation menu "fixed" to the top of the browser window?
I am half-way there...
I've changed "#gk-page-nav" position to "fixed" but this positions the navigation to the left of the browser window.
All I need now is to center the main menu on the browser window properly. I am thinking I have to define this with @media rules but perhaps there is a simpler way to keep the main navigation menu
"centered" and static while scrolling?
Any suggestions would be helpful! Thanks!
I am half-way there...
I've changed "#gk-page-nav" position to "fixed" but this positions the navigation to the left of the browser window.
All I need now is to center the main menu on the browser window properly. I am thinking I have to define this with @media rules but perhaps there is a simpler way to keep the main navigation menu
"centered" and static while scrolling?
Any suggestions would be helpful! Thanks!
-
- Junior Boarder
- Joshua M
- Tue May 10, 2016 7:13 am
Hi,
Try to add the following custom css code:
but navigation bar will have 100% width.
Try to add the following custom css code:
- Code: Select all
#gk-page-nav {
width: 100%;
position: fixed;
}
#gk-page-top {
padding: 0;
}
but navigation bar will have 100% width.
-
- Moderator
- GK User
- Wed May 11, 2016 1:30 am
The menu is 'static' but now floats to the left. How to (re)center the menu?
-
- Junior Boarder
- Joshua M
- Wed May 11, 2016 10:18 am
Could you please provide me with a URL to your website, either here or via PM (click the “Private Message” text underneath my avatar) so that I may analyze it?
-
- Moderator
- GK User
- Wed May 11, 2016 8:30 pm
Josh,
I believe it's #gk-page-nav > "max-width" that has to be configured with the correct px width (?)
I am viewing in desktop @ 1600px resolution and higher and since the max-width is set to 1320px max, the menu appears to float "left" b/c of course the resolution exceeds the max-width.
Check it yourself on a resolution higher than 1320px width and see if you get the same result (?)
Do you want us to set the "max-width" to a pixel value or 100% or...?
Let us know the best way to proceed. Thanks!
p.s. The mobile menu toggle positioning may need to be adjusted slightly too. We adjusted the css but want to make sure our css matches yours.
I believe it's #gk-page-nav > "max-width" that has to be configured with the correct px width (?)
I am viewing in desktop @ 1600px resolution and higher and since the max-width is set to 1320px max, the menu appears to float "left" b/c of course the resolution exceeds the max-width.
Check it yourself on a resolution higher than 1320px width and see if you get the same result (?)
Do you want us to set the "max-width" to a pixel value or 100% or...?
Let us know the best way to proceed. Thanks!
p.s. The mobile menu toggle positioning may need to be adjusted slightly too. We adjusted the css but want to make sure our css matches yours.
-
- Junior Boarder
- Joshua M
- Thu May 12, 2016 9:28 am
Sorry, I need to see your website to check the issue.
-
- Moderator
- GK User
- Fri May 13, 2016 10:26 am
PM Sent
-
- Junior Boarder
- GK User
- Sat May 14, 2016 8:45 pm
Joshua M wrote:Sorry, I need to see your website to check the issue.
Joshua,
Remind me, are PM's on a queue for outgoing messages to be sent?
I sent 2 PM's (same message) and they have remained in the outbox for 3 days.
Curious if I have to do anything further to get those messages to you (?)
Thanks
-
- Junior Boarder
- Joshua M
- Mon May 16, 2016 8:10 am
Hi,
The message is in your outbox until I read it.
Try to change your override code into:
The message is in your outbox until I read it.
Try to change your override code into:
- Code: Select all
#gk-page-nav {
width: 100%;
position: fixed;
max-width: none;
}
#gk-page-top {
padding: 0;
}
-
- Moderator
- GK User
- Mon May 16, 2016 12:02 pm
Joshua M wrote:Hi,
The message is in your outbox until I read it.
Try to change your override code into:
- Code: Select all
#gk-page-nav {
width: 100%;
position: fixed;
max-width: none;
}
#gk-page-top {
padding: 0;
}
Worked Perfect!
Thank you!
***Solved***
-
- Junior Boarder
10 posts
• Page 1 of 1