Saturday 21st of October 2017 06:38:26 AM


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;
margin: 20px 140px  20px 140px;
text-align: center;
#content {
width: 100%;
padding: 0px;
text-align: left;
background-color: #fff;
overflow: auto;

in both directions -- in other words, both up and down. In a similar fashion, when the repeat direction is horizontal, the background image is repeated to both the right and the left, as shown in Figure 6-50:

BODY {background-image: url(bg23.gif);
background-repeat: repeat-x;
background-position: center;}
Figure 6-50

Figure 6-50. Centering with a horizontal repeat

block would use these values:

top: 50%; bottom: 0; left: 50%; right: 0;

In this example, the outer left edge of the positioned element is placed halfway across the containing block. This is its offset from the left edge of the containing block. The outer right edge of the positioned element, however, is not offset from the right edge of the containing block, so the two are coincident. Similar reasoning holds true for the top and bottom of the positioned element: the outer top edge is placed halfway down the containing block, but the outer

HTML:lang(de) {color: black; background: yellow;}

Thus would all HTML documents marked as German be shown as black texton a yellow background. This marking could be made with thelang attribute, in a META tagin the document's head, or even as a value in thedocument's HTTP headers. This is somewhat similar to the|= attribute selector discussed in the previoussection, but it is a little more general.

mangled display to browser crashes. This happened with only a very few browser versions, and it's safe to say that very few of these browsers are still being operated. Be aware that there are some people out there using these particular browsers, and they may well have major problems viewing your page if you use these comment tags.

1.4.5. CSS Comments

happen when you apply margins to inline elements will happen if youapply padding, so it is wise to avoid setting margins, borders, orpadding on inline elements.

Opera 3.5 incorrectly permits negativevalues for padding, but version 3.6 does notsuffer from this problem. Internet Explorer 4.x will not applypadding to inline elements at all -- which is probably just aswell.