tags:

views:

362

answers:

2

Without "a" tag,it's fine:

<style type="text/css">
body {
    font: 1.0em verdana, arial, sans-serif;
}

* {
    margin:0; padding:0;
}

</style>

<table cellpadding="0" cellspacing="0" border="0">
        <tr>
                <td><img src="/images/title_equipment.gif" /></td>
                <td><img src="/images/about.gif" /></td>
                <td><img src="/images/services.gif" /></td>
                <td><img src="/images/systems.gif" /></td>
                <td><img src="/images/equipment_new.gif" /></td>
                <td><img src="/images/equipment_used.gif" /></td>
                <td><img src="/images/news.gif" /></td>
                <td><img src="/images/contact.gif" /></td>
        </tr>
        <tr>
                <td><img src="/images/balers.gif" /></td>
        </tr>
</table>

But if adding "a" tag outside "img",border comes:

<style type="text/css">
body {
    font: 1.0em verdana, arial, sans-serif;
}

* {
    margin:0; padding:0;
}

</style>

<table cellpadding="0" cellspacing="0" border="0">
        <tr>
                <td><a href="#"><img src="/images/title_equipment.gif" /></a></td>
                <td><a href="#"><img src="/images/about.gif" /></a></td>
                <td><a href="#"><img src="/images/services.gif" /></a></td>
                <td><a href="#"><img src="/images/systems.gif" /></a></td>
                <td><a href="#"><img src="/images/equipment_new.gif" /></a></td>
                <td><a href="#"><img src="/images/equipment_used.gif" /></a></td>
                <td><a href="#"><img src="/images/news.gif" /></a></td>
                <td><a href="#"><img src="/images/contact.gif" /></a></td>
        </tr>
        <tr>
                <td><img src="/images/balers.gif" /></td>
        </tr>
</table>
+10  A: 

This is the default behaviour in some browsers, IE included. You need to add this to your CSS:

a img {
    border:0;
}
David M
You don't need to be explicit about the image beind a descendent of an anchor.
David Dorward
+3  A: 
<img src="" border="0" />

or with css

border: 0;

Chris Klepeis
Look - no border! ;)
David M
haha yeah forgot the <code> tag ;)
Chris Klepeis
The CSS solution is the (only) correct one.
Williham Totland