Archived topic
How to show section exactly
7 replies · Started by Roman on February 12, 2017
Hello Tom,
I'm verry happy with your Premium Plugin.
When using the section anchor-ID - please tell me how to display the upper part of the section too, which stays hidden under the top menu, you have to scroll up to see the whole section.
See here:
https://www.tschechisch-service.de/index.php#leistungen
Roman
Hi Roman,
This is handled by GP automatically in the next version of GP Premium.
For now, you can add this CSS:
:target:before {
content: "";
display: block;
height: 60px; /* navigation height*/
margin: -60px 0 0; /* negative navigation height */
}
Hi Tom,
I sorry, it does not work ..
Try https://www.tschechisch-service.de/index.php#qwert
Roman
Tom,
it works .... I have to increase the value to 210px
Roman
Tom,
... no :-)
just the first Anchor URL works
https://www.tschechisch-service.de/index.php#leistungen
the second one not:
https://www.tschechisch-service.de/#uber-uns
Roman
You should only need to put 60px in the values.
Can you try doing that, then clear your browser cache?
Hello Tom,
yes, I was using Autoptimize and Cachify ... after disabling it was working better.
But the lower sections are still not showing exactly.
Shall I better wait for then next version or is the mentioned CSS code already the right one?
Roman
Hmm, looks like that method has some flaws.
There's more methods to try here: https://generatepress.com/forums/topic/offset-anchors-with-fixed-header/
I'll try to find something concrete to add in Menu Plus.