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 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.
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> <P> <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. 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. 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