Welcome to WebmasterWorld Guest from 54.226.27.104

Forum Moderators: not2easy

Message Too Old, No Replies

Limit link underline to text

No line under the image

     

Rain_Lover

4:20 pm on Apr 7, 2011 (gmt 0)

5+ Year Member Top Contributors Of The Month



I'd like to have the underline for the text only and at the same keep the image part of the link:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<title>Test</title>

<style type="text/css">
a:hover {text-decoration:none;}
img {border:none; vertical-align:bottom; padding-left:15px}
</style>

<a href="#">Subscribe to feed<img src="http://www.google.com/phone/static/images/feed-icon.gif" alt=""></a>


The code result isn't the same in all major browsers.
Many thanks for any help!

alt131

12:36 pm on Apr 9, 2011 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



Try adding margin-right:-31px to the css for the image.
(Where 31 = 15px padding + 16px image width)

Rain_Lover

5:05 pm on Apr 9, 2011 (gmt 0)

5+ Year Member Top Contributors Of The Month



Simple and neat! Thanks!
 

Featured Threads

Hot Threads This Week

Hot Threads This Month