offsetting an html anchor to adjust for fixed header [duplicate]
1 2 3 |
<a name="myanchor"> <h1 style="padding-top: 40px; margin-top: -40px;">My anchor</h1> </a> |
Autre solution
offsetting an html anchor to adjust for fixed header
1 |
<a class="anchor" id="top"></a> |
1 2 3 4 5 6 7 8 9 10 |
/* * offsetting an html anchor to adjust for fixed header * https://stackoverflow.com/a/13184714 */ a.anchor { display: block; position: relative; top: -130px; visibility: hidden; } |