Friday 03rd of September 2010 11:48:39 PM

center a FIXED BOX

This BOX has a fixed width.
It is centered and adjusts to the browser window.
The height adjusts to the content.
more nice and free css templates

body {
background-color: #e1ddd9;
font-size: 12px;
color:#564b47;
padding:20px;
margin:0px;
text-align: center;
}
#inhalt {
text-align: left;
vertical-align: middle;
margin: 0px auto;
padding: 0px;
width: 550px;
background-color: #ffffff;
border: 1px dashed #564b47;
}

could appear in a horizontal line and far exceed the edges of thecontaining block. Instead, if a float would stick out of itscontaining block by appearing next to another one, it is floated downto a point below any previous floats, as illustrated by Figure 8-36 (where the floats start on the next line inorder to more clearly illustrate the principle at work here). Thisrule first appeared in CSS2, to correct its omission in CSS1.

Figure 8-36

Figure 8-36. If there isn't room, floats get pushed to a new line

8. A floating element must be placed as high aspossible. affect the type of bullet used in a list, to replace the bullet with an image, and to affect where the bullet or image appears in relation to the text of the list item.

Just in case you're unfamiliar with the concept of a "bullet," it's the little decoration to the side of a list item, as depicted in Figure 7-79.

Figure 7-79

Figure 7-79. Bullets

In an unordered list, these will be little symbols, but in an ordered First, note that HTML ignores carriage returns and extra spaces. 
You have to specify line breaks.  Also paragraph breaks.  <P>But making extra space by stringing P tags together doesn't work <P><P><P><P>. Use multiple BR tags, or insert special non-breaking space characters between P tags instead:
<P>&nbsp;<P>&nbsp;<P>

  Figure 7-48. Just remember that if you leave out aborder style, the default value of none willprevent your border from appearing at all.

Figure 7-48

Figure 7-48. Letting default values fill in the gaps

By contrast, if you set only a style, you will still get a border.For example, let's say you simply want a border style ofdashed for the top of an element and are willingto let the width default to medium and the colorto be inherited from the element itself. All you need in such a caseacross multiple lines:

B {padding: 10px; background: silver;}
Figure 7-61

Figure 7-61. Padding on an inline element that spans multiple lines

As with margins, the left padding is applied to the beginning of theelement, and the right padding to the end of it; padding isnot applied to the right and left side of eachline.

Now let's talk about top and bottom padding. In theory, an