I use a WP template with a position: relative
default header. I've editedstyle.css
with the code below (from this thread):
.home .site-header.no-header-image {
left: auto;
position: fixed;
top: auto;
}
.home .site-content {
padding-top: 60px;
}
Now header on home page is fixed indeed but it only works for home page, so I've added this to style.css
:
.site-header.no-header-image {
left: auto;
position: fixed;
top: auto;
}
.site-content {
padding-top: 60px;
}
Header is now fixed on all pages but content of pages is aligned from top of the page and not from header. I've tried to change padding from .site-content
to 120/150/180 or any padding but it doesn't affect the padding of the content which does not start from the header anymore.
So here is my issue : having pages content to be aligned from header and header being position: fixed;
on all pages.
There must be something I'm missing obviously and tried lots of css modification but can't figure out what's wrong. Also, I've tried the solution from this thread which is supposedly the same problem as mine but it doesn't give any result and header stays relative with this fix.
Thanks.