text-decoration:underline problem?

Hi,

To underline my link on mouseover i have asigning this to the a:hover : -

text-decoration:underline;


It works fine in all browsers, but IE displays it slightly differently. In IE it when you have a letter that goes below the line like "y" the underline property will put a line through the "y", but in firefox,NS and opera it makes puts it below the "y".

This creates two minor effects 1. the space between the normal letters and the line is bigger in firefox,ns and opera. But also when u use verticle-align:middle; it is not quite accurate it is about 3-4 px out in the firefox, ns and opera.

Is there a way around this? or is that how it is?

Thanks
k0r54I see no difference, give a code example of the effect.hi,

you appear to be correct :o

Can you explain why on my page, on the 4 links in the gray bit just below the logo it is doin what i explained?

<!-- m --><a class="postlink" href="http://www.privatedemo.apc-compunet.co.uk/webdev/vince/equity.htm">http://www.privatedemo.apc-compunet.co. ... equity.htm</a><!-- m -->

Thanks
k0r54It appears to be a combination of problems:
Setting the font-size in px(not a good idea) gives a slightly different position for the underline. Use em or % units.
The charset=shift_jis (Japanese) is wrong, use charset=utf-8Hi, thanks it turned out to be the charset!

Is there a conversion from px to em?

What exactly is em and how can it benifit me and what does the charset do exactly?

Thanks for your help
k0r54Originally posted by k0r54
Hi, thanks it turned out to be the charset!

Is there a conversion from px to em?

What exactly is em and how can it benifit me and what does the charset do exactly?

Thanks for your help
k0r54
The "em" is a unit of measure in typesetting which is equal to the size of a capital M in a given font/font-size. (It is often used in typesetting to refer to the size of a space or dash: an em-dash or an em-space, with narrower versions being the en-dash and en-space.)

In CSS, whenever you express a size or dimension in "em" units, you are therefore expressing it in terms of the currently active font stlye/size. This can be very useful in keeping things proportionate to the text if the user increases/decreases font size based on their personal vision needs, monitor size, etc.

So, no, there is no conversion from px to em. Px is an absolute size, em is a relative size (as is percent).great explaination!

Thank you very much :)

There is still so much i need to learn :confused:

Thank you

k0r54Just do what I did: work for 3 years at a typesetting company. Then you get to add words like "kerning" and "leading" (pronounced "ledding") to your vocabulary, too. :)charset (<!-- m --><a class="postlink" href="http://www.w3.org/International/O-HTTP-charset">http://www.w3.org/International/O-HTTP-charset</a><!-- m -->)
 
Back
Top