Tuesday 26th of September 2017 12:20:32 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

body {
background-color: #e1ddd9;
font-size: 12px;
font-family: Verdana, Arial, Helvetica, SunSans-Regular, Sans-Serif;
color:#564b47;

Consider the example in Figure 9-19. It shows twoparagraphs that contain identical text. However, the first paragraphcontains an inline boldface element, and the second an absolutelypositioned boldface element. In the second paragraph, the styles usedwould be something like what is shown here:

P {position: relative;}   /* establish containing blocks */<B STYLE="position: absolute; top: auto; right: 0; bottom: 0; left: auto;width: 8em; height: 4em;">...</B>
Figure 9-19

Figure 9-19. The effects of absolute positioning

margin: 20px 140px 20px 140px; text-align: center; } #content { width: 100%; padding: 0px; text-align: left; background-color: #fff; overflow: auto; }

background may be extended above and below the edges of the line-box in which the inline element appears, but user agents are not required to support this behavior. There is also no defined behavior to say whether the foreground content of a previous line appears above the background of a succeeding line, or is overwritten by that background. Negative values are not permitted.

Example

padding-bottomIE4 P/P IE5 P/Y NN4 B/B Op3 Y/-

This property sets the size of the bottom padding of an element, and this padding will one value. In that case, the single value supplied is taken to be the horizontal value, and the vertical is assumed to be 50%. This is basically the same as with the keywords, where if only one keyword is given, the other is assumed to be center. Thus:

BODY {background-image: url(bigyinyang.gif);
background-repeat: no-repeat;
background-position: 33%;}

The background image is placed one-third of the way across the page, and halfway down it, as depicted in Figure 6-42.