Reputation: 211
The setting:
The guest list:
My code:
<span style="font-size:85%;line-height:0;vertical-align:3px;">®</span>
I can't use any sort of <sup>
tag because it doesn't render consistently despite any styling I could add.
The question:
Why is Outlook 2003 and IE7 adding extra line space above my code only on HTML entities?
What I know so far:
I can throw numbers and words in between my span tags and it's all good everywhere. Same size, same positioning, same line height. I tried switching switching to decimal entities but the results remained the same. For example, for ® I use ®
but also tried ®
. I even said "to hell with proper coding practices" and put a ® symbol straight in my HTML code. Nothin'!
So then I thought maybe it had something to do with those entities being round (I mean I dunno, I'm trying everything) so I swapped in † (†
) and ‡(‡
) but it didn't change anything.
For visual pleasure
The above screenshot was taken in Outlook 2003.
(Note: some words have been changed for privacy reasons)
Upvotes: 2
Views: 1564
Reputation: 1
If you use span tag instead of sup tag (and give it all the parameters you have above, including font-size and vertical-align, which is the only thing that sup would normally do outside of OUTLOOK's messed up little world), this should keep results in other email clients and OUTLOOK looking more similar.
Upvotes: 0
Reputation: 12193
You can play with the font-size and line-height of <sup>
elements by adding style inline to the <sup>
tag. Another CSS property that can help is baseline-shift
Personally I gave up on trying to get consistent results from <sup>
in Outlook and other email clients, as some respect one CSS element while others do not.
The most consistent result I got (where the whole line height wasn't effected) was by creating a small image, avoiding using superscript characters all together.
Upvotes: 1
Reputation: 1811
The code below has always rendered properly for me in your list of clients. Maybe try using px instead of percent in the font-size.
<sup style="font-size:10px; line-height:0; vertical-align:3px;">®</sup>
Upvotes: 0