Previous Message
Next Message

Unwanted line under img tag when inside anchor

Sent by Holly Bergevin on 3 January 2005 22:10


From: "Chris W. Parker" [EMAIL-REMOVED]>

>http://hachiroku.swatgear.com/~cparker/tests/link_styles.php

>In Firefox 1.0 (and back to Firebird 0.7, but not IE) there is a line
>created below and as wide as the image above linked text when the image
>is encapsulated within an <a> *and* has text following it. (Best to just
>look at the example page.) When no text follows the <img /> tag there is
>no line created.
>
>I think I technically understand why this is happening but it just seems
>like such an unexpected result that it might be a bug. Or that there is
>at least some easy way to fix it via CSS.

No bug, it's just space left for the descenders of the text that "might" occupy that space with the
image. The part that hangs down from letters such as p, or g, etc.

Adding {vertical-align: bottom;} to your - a img - selector, instead of the text-decoration, should
remove the problem for the image, while leaving the underline under the text unchanged.

hth,

~holly  
 
                   
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Possibly related: