White line to right of an image when used as a link

Associate
Joined
12 Sep 2006
Posts
888
Looked for ages but can't find a solution.

I have a horizontal row of images. It lookes fine when I'm not using the images as links. But I need to use every second image as a link (it's a menu) when I use them as a link I get a 1px white line to the right of the image.

Example of the html;

<li><a href="gallery_p.html" target="Iframe1"><img src="pic/portrait.jpg"</li></a>

This only happens in Chrome though. Taking out the href, the row of images are fine, no gaps, but with it there's a 1px white break to the right.

Any help would be awesome, cheers!
 
Associate
Joined
8 Aug 2008
Posts
302
Have you typed that wrong is it meant to be missing the closing image tag?

Code:
<li><a href="gallery_p.html" target="Iframe1"><img src="pic/portrait.jpg"</li></a>

Code:
<li><a href="gallery_p.html" target="Iframe1"><img src="pic/portrait.jpg" /></li></a>
 
Soldato
Joined
12 May 2007
Posts
3,891
Location
Bristol
Not to mention that you should properly nest your tags. The 'a' should be closed before the 'li'.

As for the images, have you tried

img { border: none;}
 
Associate
OP
Joined
12 Sep 2006
Posts
888
Not to mention that you should properly nest your tags. The 'a' should be closed before the 'li'.

That worked! Ah cheers mate. New to website making so it's matter of wanting to do something, I'll google how to do it then change it to fit my website.

Thanks again!
 
Top Bottom