Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Underline problem with Superscript

Status
Not open for further replies.

mhamilton3

Programmer
Oct 31, 2001
129
Hello all,
I am trying to do something simple, that does not appear simple. I have a link that I need underlined. It is a normal link with a super script. The underline for the superscript follows the character that is super scripted. I would like the underline to remain in line with the rest of the text. Does anyone have any idea how to do it?

My link is as follows

<a href="#">Registered<sup>&#174;</sup> item</a>
 
Try
Code:
<a href="#">Registered<sup style="text-decoration:none; ">&#174;</sup> item</a>

You could also redefine the element in CSS:

Code:
sup { text-decoration: none; } //and any other formatting you want, font-size, color, etc.

//or in a class
.alternate_sup { text-decoration: none; }

//used by

...<sup class="alternate_sup">&#174</sup>
 
Thank you very much for the suggestion, I will give it a try.
 
Thank you for your suggestions. Neither suggestion worked as I need it to. ChrisHunt, when implementing your suggestion, it looked the same that it did when I did not put a style on it. When implementing sysadmin43's suggestion I ended up having the first word underlined, the Registered symbol not underlined, and the second word underlined again. I am beginning to wonder if I have to make an image to get this correct. I am willing to try any other suggestions. I need to have the entire line underlined.
 
What browser are you using? Chris' solution works for me in IE6 and FF.
 
I am using Both IE6 and FF. I tried implementing the solution in a template that I am working on and the sytle sheet must be goofing something up. You are correct Vragabond, when I take Chris' line as he typed it and put it on a generic HTML page, it works fine. At least I have a direction now, thanks.
 
Yes, but I am thick and did not do the 'turn off the orginal underline' piece.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top