Easy <IMG> question

liunx

Guest
how do i specify the border color of an image i put on my page?<br />
<br />
I know border="x" specifies the size but what about the color?<br />
<br />
Thanks,<br />
Dave<!--content-->Simple:<img src=http://www.webdeveloper.com/forum/archive/index.php/"foo.png" style="border: solid color 1px;" alt="" />Also see: <!-- m --><a class="postlink" href="http://www.w3.org/TR/REC-CSS1#border">http://www.w3.org/TR/REC-CSS1#border</a><!-- m -->. {border-color: #000000;}<!--content-->Originally posted by weee <br />
.BorderColor {border-color: #000000;} You neglected to mention that this will apply a black border to all images with class="BorderColor" inside the img tag. You can apply borders to all images like this:<style type="text/css"><!--<br />
<br />
img{<br />
border:1px solid #000000;<br />
}<br />
<br />
--></style><br />
Or if you only want to apply borders to images inside links you can do this:<style type="text/css"><!--<br />
<br />
a img{<br />
border:1px solid #000000;<br />
}<br />
<br />
--></style><br />
Isn't CSS wonderful? :D<!--content-->_<!--content-->
 
Back
Top