View Full Version : changing picture border colors

01-07-2004, 03:30 AM
is it possible to change the color of a picture border to a color instead of black?

01-07-2004, 03:52 AM
yes, img src="image.bmp" bordercolor="#406080"


Paul Jr
01-07-2004, 03:56 AM
Originally posted by dodgerida67
yes, img src="image.bmp" bordercolor="#406080"
I believe bordercolor=" " has been deprecated. You should use CSS instead:

<img src="pathto/your/image.jpg" height="imgheight" width="imgwidth" alt="Alternate Text Description For Non-Graphical Browsers ect." title="More Descriptive Text Description Of The Image" style="border:2px solid #F00;" />

You can check out this link (http://www.w3schools.com/css/default.asp) for more information on CSS.

01-07-2004, 06:52 PM
Or, even better, don't use inline CSS:
<img id="image" ... />

img#image { border: 1px solid #f00 }Or even better, don't use <img/> at all, because it's style and not content (unless it's something like an explanatory diagram), and shouldn't appear in your markup. Use background-image instead.