Home › Forums › Support › How can i create a fixed Header and top Menu in the Generate Press Theme › Reply To: How can i create a fixed Header and top Menu in the Generate Press Theme
Hi Tom,
First of all I love GP and how helpful you are in the forums!
I have my top menu floating to the right of the header and used your code (#31579) to make them both stick to the top.
.custom-fixed-header {
position: fixed;
top: 0;
width: 100%;
z-index: 2000;
}
.container {
padding-top: 60px;
}
And of course the admin bar covered my top menu. By accident I found that setting top: 1; instead of top: 0; in your code solved that problem. I’m not sure why and I’m not sure if it’s a proper way of doing it or if it may cause any problems? Is your way (#83502) better?
.admin-bar .custom-fixed-header {...}
If so, can you please explain how/where to use that information because I don’t get it.
And btw it would be great if you could make this an add-on, perhaps called Header Plus. 🙂