i added the following code to my comments.php:
paginate_comments_links( array(
'prev_text' => '« précédent',
'next_text' => 'récent »',
'add_fragment'=> '#comments'
) );
when clicking the paging links the whole page shifts by 12px. A portion at the top is cut off and a portion is added below the footer. My html is contained by a #main div
. I tried the following CSS approach:
#main:before {
display: block;
content: " ";
margin-top: 0;
visibility: hidden;
}
or
#main {
scroll-margin-top: 0;
}
This has no effect. I tried various elements on my page with the same css, but nothing held the page in position and the shift is always happening. Only when i leave add_fragment
empty (”) the page does not shift. But the focus is not on the comments.
Most likely this is a html problem. Has someone had a similar shift of the page, when the comments page links are clicked? Thanks for your suggestions. Theo
add_fragment argument in paginate_comments_links shifts the page when clicking the paging links
i added the following code to my comments.php:
when clicking the paging links the whole page shifts by 12px. A portion at the top is cut off and a portion is added below the footer. My html is contained by a
#main div
. I tried the following CSS approach:or
This has no effect. I tried various elements on my page with the same css, but nothing held the page in position and the shift is always happening. Only when i leave
add_fragment
empty (”) the page does not shift. But the focus is not on the comments.Most likely this is a html problem. Has someone had a similar shift of the page, when the comments page links are clicked? Thanks for your suggestions. Theo
Filed under: Kiến thức lập trình - @ 20:54
Thẻ: htmlwordpresscomments
« Can anyone help me fixing File Upload vulnerability after I uploaded a file by changing the extension from .html to .png? ⇐ More Pages ⇒ How can I use the content of a C# string as a classname (for a cast)? »