And you’ve got a color that looks like... well... light gray slate.
Nobody’s perfect. Microsoft spells graywith an “a” most of the time, but else-
where — in this same list — they use an “e,” as in “LightGrey.”
Coloring borders ...............................................................................
Foreground color doesn’t apply only to text. You can also use it to specify
the color of borders. In this next example, you set the colorproperty of an
image to skyblue. (Alternatively, you could use the border-colorproperty
if you wish.) In addition, you set the border-widthto make it larger than the
default. You also must specify a border-styleproperty:
<html>
<head>
<style>
img {border-style: solid;border-width:25px; color: skyblue;}
</style>
</head>
<body>
<img WIDTH=320px; HEIGHT=264px; src=”GrandfatherHouse.jpg”>
</body>
</html>
If you want to try this example, first save a graphics file in the same directory
as this .htm file and name that file GrandfatherHouse.jpg.
As you can see when you test this example, a border in light blue is placed
around the graphic. See Figure 6-5.
A monochromatic, plain border is pretty dull. It harkens back to earlier days
when computers were straining to provide even simple color effects.
I suggest that you avoid the plain CSS frames and consider generating a cool
frame in a graphics program. Then you can drop your image into that frame
in the graphics program itself and simply save the whole thing as a new .jpg
file. The frame then becomes part of the image itself, and you just load that
image file into your Web page. You don’t have worry about using the simple
118 Part II: Looking Good with CSS