Welcome to WebmasterWorld Guest from 54.226.246.160

Forum Moderators: not2easy

Message Too Old, No Replies

Eliminate border on hyperlinked image?

     

LogicsHere

12:27 am on Sep 14, 2005 (gmt 0)

5+ Year Member



Over the past week, I've been trying to learn CSS and have come up with the majority of coding issues I had, with two exceptions . . . tables (not too urgent at this moment) and borders around hyperlinked images (HOT).

I've searched for coding on eliminating the border around a hyperlinked image. This is extremely important as on my well over 500 pages I have on line, the majority are image hyperlinks necessary for style and theme. Can someone help?

Setek

1:45 am on Sep 14, 2005 (gmt 0)

10+ Year Member



If absolutely all images with hyperlinks need no border, simply:

a img { border: 0; }

:D

LogicsHere

10:20 am on Sep 14, 2005 (gmt 0)

5+ Year Member



I'll give this a try, thanks. :)

LogicsHere

10:30 am on Sep 14, 2005 (gmt 0)

5+ Year Member



I tried as you suggested. Unfortunately, it didn't work. I could go back to the border=0 acceptable in Traditional, but I was hoping to keep code validated as Strict.

If anyone else knows how I might do this, please let me know.

jetboy

10:43 am on Sep 14, 2005 (gmt 0)

10+ Year Member



And you don't have a more specific rule overriding Setek's (correct) suggestion? Try something like:

html body a img { border: 0; }

just to see. Do you get the same result if you use border-width: 0; instead of border: 0;?

xcandyman

10:43 am on Sep 14, 2005 (gmt 0)

10+ Year Member



Make sure the image in question hasn't got border=1 or something similar after the image location and url.

coho75

10:57 am on Sep 14, 2005 (gmt 0)

10+ Year Member



Try using the following code: a img { border: none; }

LogicsHere

11:15 am on Sep 14, 2005 (gmt 0)

5+ Year Member



Thanks for all your replies. I actually used part of Setek's code. I dropped the "a" and used the following:

img { border: 0; }

and it worked.

Thanks again, everyone.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month