Forum Moderators: not2easy

Message Too Old, No Replies

link using CSS

         

Geoffrey james

6:11 pm on Jul 31, 2006 (gmt 0)

10+ Year Member



Hi all,

Im very new to external CSS and have created a css style that contains the positioning and size, as shown below:

#contacticon
{ float:right; margin:14px 2px; width: 22px; height: 22px;
}

and have attached a div within the html page like below:

<div id="contacticon"><a href="contact.html"><img src="images/envelope-icon.gif" /></a></div>

the thing is, since I have put a link on this icon its now got a coloured border around it. Is this just to show me as a designer that the icon has a link, or will it be there on the actual webpage?

When i preview in browser the blue border is still there.

Any help please.

Thanks
geoff

Fotiman

7:41 pm on Jul 31, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Add this to your CSS:

#contacticon a img
{
border: 0;
}

That will remove the border for images within links within #contacticon. If you want to remove them for the entire page, then just use this:

a img
{
border: 0;
}

Geoffrey james

9:04 pm on Jul 31, 2006 (gmt 0)

10+ Year Member



many thanks.

I knew id read about it in one of my books, just couldnt find it, you prob know what its like.

Once again, thanks

Geoff

ps: im sure i will be posting many more questions about css on this excellent forum, especialy since im just strting to learn css (external), although i do try and make every effort to figure things out before posting.

cheers