homepage Welcome to WebmasterWorld Guest from 54.243.12.156
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: DrDoc

CSS Forum

    
Eliminate border on hyperlinked image?
LogicsHere




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

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




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

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

a img { border: 0; }

:D

LogicsHere




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

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

LogicsHere




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

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




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

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




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

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

coho75




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

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

LogicsHere




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

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved