Welcome to WebmasterWorld Guest from 54.196.114.201

Forum Moderators: not2easy

Message Too Old, No Replies

CSS, borderless image links and NS4

Is it possible?

     
6:01 pm on Sep 4, 2002 (gmt 0)

Moderator

WebmasterWorld Administrator ergophobe is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 25, 2002
posts:8296
votes: 140


Subject says it (I'm testing in Netscape 4.51). Is it possible to eliminate the border around an image link using CSS only?

<a href="somelink.html"><img src="someimage.gif"></a>

img {border: none;}

and a million other permutations that I've tried, always leave the border around the image and it's always blue (so I can't hide it by coloring it like the background).

Any pure CSS solutions.

Thanks

Tom

6:11 pm on Sept 4, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member nick_w is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Feb 4, 2002
posts:5044
votes: 0


FWIT: I've never managed it either :(

Nick

6:44 pm on Sept 4, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


On another thread [webmasterworld.com] bobriggs came up with the answer. Netscape 4 gets the anchor tangled in with the image. So the solution is to add in a style for a:link --

a:link {
border:none;
}

That does the trick for linked images in NN4.

9:43 pm on Sept 4, 2002 (gmt 0)

Moderator

WebmasterWorld Administrator ergophobe is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Apr 25, 2002
posts:8296
votes: 140



a:link {
border:none;
}

Tried that and tried it with properties
border
border-width
border-color (to match background)
border-style

And I applied them to the tags

a
a:link
img

And I also checked to see whether I could set it with Javascript Styles using

tags.a.border = 'none'
tags.img.border = 'none'
tags.*.borderWidth = '0px'
tags.*.borderStyle = 'none'

Nothing works in NS4.5. I know support is a bit better in NS4.7, so it may work there. I sort of use 4.5 as the acid test for backward compatibility, but I think this is just beyond what it can handle without <img src="file.gif" border="0">

Cheers,

Tom