...

View Full Version : img as a link-color



ripken204
06-08-2007, 06:01 AM
<a href="\"><img src="img.jpg"></a>

for example if i do the above. in IE and FF there will be a color around the image. is there anyway to get rid of this without have to use css? it moves the image by a few pixels and i dont want that to happen.

_Aerospace_Eng_
06-08-2007, 06:04 AM
Its called a border. Add this to your stylesheet

a img {
border:0;
}
If you don't know what a stylesheet is then I suggest you stop coding html now and being to learn CSS. If you really don't care then add this to the image tag

style="border:0;"

ripken204
06-08-2007, 06:40 AM
if i dont know what a stylesheet is, haha, comeon! thats like first day html. currently im setting up my site with pure css, no tables, all i can say is that getting all 3 browsers to use it is hard! stupid MS with their made up rules!

anyways, its not the border, that was the first thing that i tried.
a crappy way that i got around this was using the onclick method in the img tag to set the current window to where i wanted to go. i also used css to change the cursor when i hovered over it. so as long as javascript is enabled in the browser..

this isnt an essential link either. it is just the logo image that ppl can click on to go back to the home page, but i also have a link to the homepage in the menu.

_Aerospace_Eng_
06-08-2007, 08:01 AM
And if javascript is disabled? Maybe you should post a link to your site since you didn't explain yourself well enough to begin with.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum