Click to See Complete Forum and Search --> : Image border colour


Googs62
07-06-2006, 09:56 AM
I want to have a border surrounding a graphic, however, I want to make it a colour other than black. Anyone know how to do this? I can't seem to figure it out.

dthurman1432
07-06-2006, 10:01 AM
bordercolor="#anycolor"

The Little Guy
07-06-2006, 10:02 AM
<head>
<style type="text/css">
img{border:#FF0000;}
</style>
</head>

Googs62
07-06-2006, 10:19 AM
Ok, neither of these things worked.

<head>
<style type="text/css">
img{border:#FF0000;}
</style>
</head>

I have this in my code at the top of the page between the <HTML> and <BODY> tags. For example:

<HTML>
<head>
<style type="text/css">
img{border:#FF0000;}
</style>
</head>
<BODY>

I feel that perhaps I am not placingthis correctly. Should I be placing this somewhere different?

The Little Guy
07-06-2006, 10:29 AM
No, leave it where you placed it, I just forgot a little bit of code. This will apply this to all images
<head>
<style type="text/css">
img{border:solid 1px #FF0000;}
</style>
</head>

Or To apply to certain images, use the class attribute like this:
<head>
<style type="text/css">
.imgborder{border:solid 1px #FF0000;}
</style>
</head>
<img class="imgborder" src="img.jpg">

Googs62
07-06-2006, 10:46 AM
Perfect, thank you so much!