9 replies [Last post]
Bobzilla
Bobzilla's picture
Offline
newbie
BC Canada
Last seen: 12 years 20 weeks ago
BC Canada
Timezone: GMT-8
Joined: 2009-12-29
Posts: 3
Points: 4

My webpages include several anchors that have superscripted text in the labels:

My question is relatively simple:

Is there a way (preferrably using CSS) to cause the default underlining of the superscripted text to remain in alignment with the underlining of the adjacent normal text, instead of following the superscripted text upwards the half line?

So far, using text-align:super or the HTML sup tags result in the same jog in the underline. I can supress the underline altogether, but haven't been able to figure out how to get the underline to stay on the baseline of normal text.

Any suggestions?

TIA

Bobzilla

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 18 weeks 5 days ago
Timezone: GMT-5
Joined: 2009-10-09
Posts: 2050
Points: 2282

Try using a doctype.

Try using a doctype.

Bobzilla
Bobzilla's picture
Offline
newbie
BC Canada
Last seen: 12 years 20 weeks ago
BC Canada
Timezone: GMT-8
Joined: 2009-12-29
Posts: 3
Points: 4

Thanks for the reply, and the

Thanks for the reply, and the suggestion Verschwindende.

Currently, the doctype declaration is transitional, however I do not understand how that could affect my problem.

Can you explain a bit, please?

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 18 weeks 5 days ago
Timezone: GMT-5
Joined: 2009-10-09
Posts: 2050
Points: 2282

The only way I was able to

The only way I was able to duplicate your issue was to put IE into quirks mode by removing the doctype. IE was also the only browser to have this issue in quirks mode.

Can you show either a link to the page with this issue or the source code (all of it, not just snippets). Perhaps you have an XML prolog or an incomplete doctype.

Bobzilla
Bobzilla's picture
Offline
newbie
BC Canada
Last seen: 12 years 20 weeks ago
BC Canada
Timezone: GMT-8
Joined: 2009-12-29
Posts: 3
Points: 4

Hi Versch, here is the code,

Hi Versch, here is the code, and how it acts...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title></title>
  <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  <style type="text/css">
      .no_ul {text-decoration:none;}
  </style>
</head>
<body>
<p><a href="7pop.html">More 7<sup>th</sup> Path&trade; Info</a></P>
<p><a href="7pop.html">More 7<sup class="no_ul">th</sup> Path&trade; Info</a></P>
</body>
</html>

wolfcry911
wolfcry911's picture
Offline
Guru
MA, USA
Last seen: 8 years 11 weeks ago
MA, USA
Timezone: GMT-5
Joined: 2004-09-01
Posts: 3224
Points: 237

not tested: remove the

not tested: remove the text-decoration on the entire anchor and replace it with a border-bottom

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 18 weeks 5 days ago
Timezone: GMT-5
Joined: 2009-10-09
Posts: 2050
Points: 2282

Bobzilla wrote: Hi Versch,

Bobzilla wrote:
Hi Versch, here is the code, and how it acts...
This produces the following result:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title></title>
  <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
</head>
<body>
<p><a href="7pop.html">More 7<sup>th</sup> Path&trade; Info</a></P>
<p><a href="7pop.html">More 7<sup class="no_ul">th</sup> Path&trade; Info</a></P>
</body>
</html>

Is that not what you want?

Verschwindende
Verschwindende's picture
Offline
Guru
Last seen: 18 weeks 5 days ago
Timezone: GMT-5
Joined: 2009-10-09
Posts: 2050
Points: 2282

Here is what occurs when I

Here is what occurs when I remove the doctype:

The reason this happens is that a page without a complete doctype is rendered in quirks mode in IE.

wolfcry911
wolfcry911's picture
Offline
Guru
MA, USA
Last seen: 8 years 11 weeks ago
MA, USA
Timezone: GMT-5
Joined: 2004-09-01
Posts: 3224
Points: 237

Bobzilla, you appear to be

Bobzilla, you appear to be using a complete doctype. Do you have anything preceding it (which would throw IE into quirks mode)?

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 7 years 19 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

WHAT BLOODY BROWSER ARE WE

WHAT BLOODY BROWSER ARE WE TALKING ABOUT!

Anyone would think there was only one! anyone would think that stating IE covered things, IE is not a browser it is a reference to a group of browsers each acting quite differently from the last. If we are referring to IE6 then your out of luck, follow Wolfies best advice earlier and border-bottom it.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me