Anchor tags

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Anchor tags

Shields,Dan

I think it would be helpful if, when an anchor link is clicked, the resulting page’s anchor could be styled to emphasize where on the page it is. In other words, clicking on index.html#tag would take you to an index page where the Tag section is custom-styled. This would be particularly helpful for anchored links near bottom of pages.

 

Thanks.

 

-Dan

Reply | Threaded
Open this post in threaded view
|

Re: Anchor tags

Matthias Reuter-2
> I think it would be helpful if, when an anchor link is clicked, the  
> resulting page's anchor could be styled to emphasize where on the page  
> it is. In other words, clicking on index.html#tag would take you to an  
> index page where the Tag section is custom-styled. This would be  
> particularly helpful for anchored links near bottom of pages.

This is what the :target pseudo class of CSS is for:

http://www.w3.org/TR/selectors/#target-pseudo
http://caniuse.com/#search=:target

Matt


Reply | Threaded
Open this post in threaded view
|

Re: Anchor tags

T.J. Crowder
In reply to this post by Shields,Dan
Hi,

You're looking for the :target pseudo-selector in CSS3:
T.J. Crowder
Independent Software Engineer
tj / crowder software / com
www / crowder software /com

On 2 July 2012 19:16, Shields,Dan <[hidden email]> wrote:

I think it would be helpful if, when an anchor link is clicked, the resulting page’s anchor could be styled to emphasize where on the page it is. In other words, clicking on index.html#tag would take you to an index page where the Tag section is custom-styled. This would be particularly helpful for anchored links near bottom of pages.

 

Thanks.

 

-Dan


Reply | Threaded
Open this post in threaded view
|

Re: Anchor tags

Jukka K. Korpela-2
In reply to this post by Shields,Dan
Styling  the destination element of a link is more a CSS issue than HTML. It is handled rather well in CSS3 with the ::target pseudo-element, which is widely supported by modern browsers.

Yucca

----- Reply message -----
Lähettäjä: "Shields,Dan" <[hidden email]>
Vastaanottaja: "[hidden email]" <[hidden email]>
Aihe: Anchor tags
Päivämäärä: ma, heinäkuuta 2, 2012 21:16


I think it would be helpful if, when an anchor link is clicked, the resulting page’s anchor could be styled to emphasize where on the page it is. In other words, clicking on index.html#tag would take you to an index page where the Tag section is custom-styled. This would be particularly helpful for anchored links near bottom of pages.

 

Thanks.

 

-Dan