On 14/02/2016 17:42, Julian Sedding wrote:
> Hi Vikas
>
> I agree that having the anchor text hidden is a usability hazard. I
> tried your suggested approach in Firefox (via FireBug) and didn't have
> any success. However, a slight variation of the scheme, still relying
> on the ":target" pseudo selector, did the trick for me.
>
> h2 > a:target {
>     position: relative;
>     top: -40px;
> }
>
> I scoped the rule to the "h2" element, which is defined to have a
> height of 40px. I think it's then ok to repeat this value.
>
Another point I remember from my past in HTML+CSS is that instead of
using `px`, use `pt`. Rather than being a fixed amount of pixels which
will vary in rendition from device to device, it will vary according to
the user selected text size (points). Or was something around such
explanation. :)

HTH
Davide


Reply via email to