View Full Version : img inside a tag

12-22-2007, 10:58 AM
if I remove href img apears as it is, otherwise it has 1 pix border around it. Tryed text-decorattion: none, etc, nothing helps.

How to sort this out ?

<a href = "#" >
<IMG SRC="mcUser.png" />

Bill Posters
12-22-2007, 11:00 AM

a img {
border: 0 none;

12-22-2007, 11:17 AM

12-22-2007, 01:06 PM
You should also note, that
<IMG SRC is not valid Xhtml. It should be
<img src (lowercase, no uppercase in xhtml).

12-22-2007, 02:12 PM
The alt attribute is also required, both in HTML & XHTML.

01-16-2008, 12:42 AM
put your code all on one line without pressing the enter key until after </a>

like this

<a href="#"><IMG SRC="pcUser.png" /></a>

01-16-2008, 01:54 AM
I used to put this at the start of all my CSS files:

* {
margin: 0;
padding: 0;
border: none;

But the border:none; like that removes needed borders on forms so now I do this:
]* {
margin: 0;
padding: 0;
img {
border: none;

And your link should look something like this <a href="http://nopeople.com/Design/"><img src="path/to/your/image.jpg" width="863" height="599" alt="description goes here" /></a>

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum