Forum Moderators: not2easy

Message Too Old, No Replies

"Active" Anchor Link Styling?

         

abudesigns

3:24 am on Apr 2, 2009 (gmt 0)

10+ Year Member



Was wondering about this for some time, now i have a chance to use it, so figured i'd see if it's possible.

I have a page displayed with a menu at the top and several paragraphs below the menu. When you click the menu, it takes you to the anchor on that same page.

Is there a way to style the anchor text in order to make it stand out more? Possibly change the color and weight of the text?

For example. Each anchor is the title of the info below it.
I'd like to change the display of the title when viewing it. I figured there was a way, because when you click the menu item, the URL displays the page and the anchor. Like so.

www.somesite.com/anchor_page/#anchor_title_1
www.somesite.com/anchor_page/#anchor_title_2
www.somesite.com/anchor_page/#anchor_title_3

coopster

2:17 pm on Apr 2, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You could use some JavaScript to check the
hash
property when the anchor is clicked and modify the style of the named anchor if it matches.

abudesigns

5:09 pm on Apr 2, 2009 (gmt 0)

10+ Year Member



Cool, i'll give it a shot and post the results.
Thanks!