Tuesday 26th of September 2017 12:20:45 AM

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;
chapter will contain a good many caveats, warnings, and discussions
of browser bugs and inconsistencies between operating systems.
Remember, though, that CSS is not supposed to be a totally precise
layout language -- and besides, many of the issues discussed in
the chapter are not the fault of CSS but are more fundamental issues
that you'll encounter no matter what you try to do with a
computer. So, once you've finished this chapter, you will have
a grasp not only of how CSS units work, but perhaps also of a few
basic issues that you previously were unaware of.

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; }

corner of the containing element, as in Figure 6-43:

BODY {background-image: url(bg23.gif);
background-repeat: no-repeat;
background-position: 20px 30px;}
Figure 6-43

Figure 6-43. Offsetting the background image using length measures

This is, of course, different than percentage values, in the sense that the offset is simply from one top left corner to another. In other words, the top left corner of the background image lines up with the point specified in thethin, black top and bottom borders with thick, gray side borders, and medium, gray borders around P elements, this will suffice, as we can see in Figure 7-42:

H1 {border-style: solid; border-width: thin thick; border-color: black gray;}
P {border-style: solid; border-color: gray;}
Figure 7-42

Figure 7-42. Borders have many aspects

By default, a single color value will be applied to all four sides, as with the paragraph in the previous example. On the other hand, if you supply four color values, you can get a different color on each