HTML and CSS Reference
In-Depth Information
Now let's consider the CSS configuration. Type the CSS in your document as it is dis-
cussed as follows:
1. Body Selector. Set the margin to 0 pixels. Configure the background color to
#ffffff .
body { margin:0;
background-color: #ffffff;
}
2. Container. Configure this area with background ( #eeeeee ) and text ( #006600 )
colors, a minimum width of 700 pixels, and with font family of Verdana, Arial or
sans-serif.
#container {
background-color: #eeeeee;
color: #006600;
min-width: 700px;
font-family: Verdana, Arial, sans-serif;
}
3. Logo. Code this area so that the image showybg.jpg will repeat using
background-image:url(showybg.jpg) . The text should be set to 2.5em font
size and bold. The height of the logo area is 100 pixels—this corresponds to the
height of the background image. Although it will most likely never display, con-
figure the background color to #eeeeee . The text color should be #cc66cc . Set
the left padding to 20 pixels. Configure a 2 pixel solid black border across the
bottom of this area as follows:
#logo { color: #cc66cc;
background-color: #eeeeee;
border-bottom: 2px solid #000000;
height: 100px;
background-image: url(showybg.jpg);
padding-left: 20px;
}
4. Left Column. One of the keys to this three-column page layout is that the left
column is designed to float to the left of the browser window. Configure a width
of 150.
#left { float: left;
width: 150px;
}
5. Right Column. One of the keys to this three-column page layout is that the right
column is designed to float to the right of the browser window. Configure a
width of 200 pixels.
#right { float: right;
width: 200px;
}
6. Center. The center column will take up all the room that is available after the left
and right columns float. The content area has a special need for margins since the
left and right columns are floating on either side. Set the left margin to 150 pixels,
the right margin to 200 pixels, and the remaining side margins to 0. Configure
Search WWH ::




Custom Search