PDA

View Full Version : change image border color


Buzz
11-17-2003, 10:31 AM
hi

how can i change the color of an image's (jpg etc) border to for example white or silver?? How do I specify this in html code?

Thanks

mindlessLemming
11-18-2003, 08:48 AM
<img src="file.jpg" width="205" height="43" alt="image description" style="border:1px solid silver">

OR
replace silver with a hex value
OR Better still:
put the style info in an external CSS file
eg -

<!--CSS File-->
.imageStyle{
border:1px solid silver;
}

<!--HTML-->
<img src="file.jpg" width="205" height="43" alt="image description" class="imageStyle">



PS - The attributes I have included with the image are the minimum req. for an truly accessible site. (ie - text readers will tell the blind what they're missing etc.)


:thumbsup:

Acecool
11-18-2003, 12:20 PM
or

img{
border:1px solid silver;
}

Affects ALL img tags

Buzz
11-18-2003, 02:58 PM
thanks for all your help, i have to start getting into style sheets some time :D :) :thumbsup: