Here’s the complete code that produces Figure 4-9. Note: This code assumes
that you have a graphic file with a sandstone texture (called sandstone.jpg)
in the same folder on your hard drive as the .htm file. If you don’t, substitute
another texture in a graphics file for the background, but name it
sandstone.jpg so that the following code will work.
<html>
<head>
<style>
div.sidebar {position: absolute; z-index: 1; background-
color: cornflowerblue; top: 20; left: 30; width:
150px; height: 35%; padding-left: 6px; padding-
right: 4px; padding-top: 6px; font-size: 16pt;}
div.maintext {position: absolute; z-index: 2;
filter:progid:DXImageTransform.Microsoft.Alpha(opa
city=60); background-color: darkkhaki; top:
55;left: 100px; height: 75%; width: 75%;}
</style>
</head>
<body background=”sandstone.jpg”>
Figure 4-9:
Combine
positioning,
z-index, and
opacity to
create many
cool effects.