html question! about borders! and colors!

BlurOfSerenity

New Member
so, i'm doing an html project for my html class, and one of the requirements is a border around a picture.
i've got the border sorted out. the existance of it has been established.
however.... is it possible to make it be some color other than black??
it's black, and you can barely see it, and it would be much more enhancing to the picture, and i know what color i want it...

but i dont have the code! and i can;t find it anywhere online! like, i did google searches, and got no results.

dammit! what's the code?? :(

pleeease help?
 
Look at the page source for a page which contains an image with a border... I'm not familiar with html, but that should work.
 
<style>
img#name {
border: 1px solid #aaaaaa;
}
</style>

making sure you name the image in the tag... i.e. <img name="name" src="yadda" />





 
You can define the width by adding border=x to the img tag, where x is the width you want it (1, 5, or whatever). That doesn't solve your color problem, but it does solve your "can barely see it" problem. Truth to be told, though, the only time you'd ever want to use it would be a thin outline for a picture that's so light on one edge that it wouldn't be discernable from the page background, and in that event any color besides black would probably be ugly.

Also remember: if you have an image you want to use as a link, make sure you define the border as 0 to get rid of the line it automatically puts in.
 
Back
Top