Archived topic
Logo and Navigation centred
7 replies · Started by Ivo on August 25, 2021
Hi there,
We would need to use a bit of CSS.
Any chance you can link us to the site in question?
You can use the private information field:
https://docs.generatepress.com/article/using-the-premium-support-forum/#private-information
Let me know :)
Hi Ivo,
Try this CSS:
#site-navigation {
margin-top: 202px;
}
#masthead, #site-navigation {
position: fixed;
top: 0;
left: 50%;
transform: translatex(-50%);
z-index: 999999;
width: 100%;
}
Hi Ying,
Thanks you, the sticky header partially covers the header image:

#masthead, #site-navigation {
position: fixed;
top: 0;
left: 50%;
transform: translatex(-50%);
z-index: 999999;
width: 100%;
}
/* Page-Headers margin */
.gb-container-ae74c347 > .gb-inside-container {
margin-top:202px;
}
/* Homepage margin */
.entry-content {
margin-top:202px;
}
Hi there,
few things:
1. remove All that CSS and use this, its Yings original CSS that is applied only to mobile, and includes the home page adjustment:
@media(min-width: 769px) {
#site-navigation {
margin-top: 202px;
}
#masthead, #site-navigation {
position: fixed;
top: 0;
left: 50%;
transform: translatex(-50%);
z-index: 999999;
width: 100%;
}
home #page {
margin-top: 240px; /* Height of header and Navigation */
}
}
2. Edit your Block Element displayed on your other pages, select the parent container block and add 240px Top margin to the Block. Then select the Mobile Tab, and set that value to 0
Thank you!
You're welcome
