...

View Full Version : Need help with border issue



tlulz
11-09-2012, 12:28 PM
Hi everyone, coding newbie here.

So I pretty much learnt everything on my own, so I have glaring gaps in knowledge in coding. Anyway, here is what I'm trying to do:

- I have a CSS code for a hover effect, which works fine.
- For the site that I want to use it for, I can't use <div> or <style> tags.

Here is my coding (with image urls and site urls taken out):


CSS

.link {
margin-top:20px;
margin-left:15px;
width:243px;
height:136px;
background:url(img1.jpg);
background-repeat:no-repeat;
}



.link:hover {
width:243px;
height:136px;
background:url(img2.jpg);
background-repeat:no-repeat;
}

HTML
<a href='url/' target='_blank'><img style='position:relative; left:-350px;top:-10px;border:0;' class='link'></a>

The problem
The css works fine, the only problem is that now, I'm stuck with a small grey border around my image that I can't seem to shake off. Since it's an area that is supposed to be filled with
<img src="url"> (i suppose), it has that border. I don't really know if I'm being clear, but I hope that I've explained it ok. Again, coding noob, thus I need the help. Any advice would be MUCH appreciated!

Thanks!

abduraooft
11-09-2012, 12:33 PM
Add
a img{border:none;} into your CSS



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum