Skip navigation
Home/Support/

Forums

This discussion is locked
10264 Views 0 Replies Latest reply: Apr 9, 2009 11:06 AM by David_Powers RSS
David_Powers Community Professional 5,111 posts since
Jun 4, 2002
Currently Being Moderated

Apr 9, 2009 11:06 AM

Get rid of blue borders around images in links

When you use an image as a link, a blue border surrounds the image like this:

blue_border.jpg

This is because since Dreamweaver CS3, Dreamweaver no longer inserts border="0" in the image (<img>) tag. Although some people will tell you to set the image border to zero in the Property inspector, this is NOT the correct way to do it. Use CSS instead.

 

Create the following style rule, either in a <style> block in the <head> of the page, or preferably in an external style sheet:

a img { border: none; }

This automatically removes the blue border from ALL images that are used as links. If you use an external style sheet, and link it to all the pages in your site, the same rule affects every image link in your site. This is much more efficient than adding zero to the border property in each individual image.