I have added a same page link to my site. However it has had a strange affect on ID link. The link (id="L3) now is now highlighted blue and underlined. I have tried to add a class to to it. However this only work when you mouseover it.
Can anyone advise how I can create a same page link without the ID being styled. Or to permanently style the ID link.
contains two different sections with that same id. Apart from the fact that an id can only validly be used once per page, that’s going to create unexpected results.
As far as styling goes, you’ll need to show us your CSS and explain a little more clearly what the problem is and what you want. :)[/FONT]
[FONT=Verdana]Blue and underlined generally is the default setting for links. If you want them to display differently, you’ll need to set specific styles. If some of your links are already styled differently, then you’ll need to amend your CSS to make them all the same - if that’s what you want - but as you haven’t shown the full CSS here, I can’t be more helpful than that.
And you still need to address the issue of having the same id twice on your page.[/FONT]
However, using the code that you’ve pasted here, I still get the first (link) line of text blue and underlined, and the second line black, with no underlining, which is what you would expect. Works in Firefox and Chromium. Which browser are you using?[/FONT]
[font=verdana]Sorry Thom but that’s not the 21st century way … the use of <a name=“…”> isn’t recommended any more, for a number of reasons not least of which is the potential for confusion when styling a {...}.
The best way to link to a point within a page is just to put an ID on whatever element you want to link to. So if you want the reader to jump to <div class="boardsegmentheaders"> then that’s what you give the ID - ie [color=green]<div class="boardsegmentheaders" id="L3">[/color]. You don’t need to add in any extra elements, you can just use what you’ve already got there.[/font]
name on <a tags is obsolete - it is only necessary if you have visitors using the long dead Netscape 4.
Similarly an id can go on any tag not just on an <a> so it generally works out better to not put it on an <a> tag unless you need to also support Netscape 4 - in which case you’d include both an id and a name with the same value.