Thursday 11th of March 2010 09:11:59 AM

center

This BOX ist centered and adjusts itself to the browser window.
The height ajusts itself to the content.
more nice and free css templates

the moment. For example, let's say that we want the dark bluecolor to be applied to all H2 elements that aresubsection headings. It would be much better to pick a class namelike subsec or evensub-section. Both of these names have theadvantage of actually meaning something -- and, furthermore, ofbeing independent of any presentational concepts. After all, youmight decide later to make all subsection titles dark red instead ofdark blue, and the statement H2.dkblue {color:maroon;} is a little silly.
body {
background-color: #e1ddd9;
font-size: 12px;
font-family: Verdana, Arial, Helvetica, SunSans-Regular, Sans-Serif;
color:#564b47;
margin: 20px 140px  20px 140px;
text-align: center;
}
#content {
width: 100%;
padding: 0px;
text-align: left;
background-color: #fff;
overflow: auto;
}

the past and have ever set a color in the course of that authoring, then this part will be a snap. You can set a color using the same hexadecimal notation so familiar to web authors:

H1 {color: #FF0000;}   /* set H1's to red */
H2 {color: #903BC0;}   /* set H2's to a dusky purple */
H3 {color: #000000;}   /* set H3's to be black */
H4 {color: #808080;}   /* set H4's to be medium gray */

If you aren't familiar with this notation, here's a quick primer. First, hexadecimal means base-16right padding, they will be visible, as Figure 7-60makes apparent.

B {padding-left: 10px; padding-right: 10px; background: silver;}
Figure 7-60

Figure 7-60. Padding on an inline element

Note the extra background space that appears on either end of theboldfaced text. There's your padding.

This all seems familiar enough, even when the boldfaced textstretches across multiple lines. Turn to Figure 7-61 border has no style, then it may as well not exist, so it doesn't. The absence of a border style also resets the width, but we'll get to that in a little while.

Finally, the default border color is the foreground color of the element itself. If no color has been declared for the border, then it will be the same color as the text of the element. If, on the other hand, an element has no text -- let's say a table which contains only images -- then thanks to the fact that color is inherited, the border color for that table would be the text color of