Sunday 28th of May 2017 06:27:13 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;

8.4.4.1. Adding box properties

After everything else, applyingmargins, borders, and padding to inline replaced elements almostseems simple.

Padding and borders are applied to replaced elements as normal;padding inserts space around the actual content (for example, agraphic) and the border surrounds the padding. What'sinteresting is that these two things actually do influence the height 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; }

UL {margin-bottom: 10px;}
LI {margin-top: 10px; margin-bottom: 20px;}
H1 {margin-top: 28px;}

Therefore, the last item in the list has a bottom margin of 20 pixels, the bottom margin of the UL is 10 pixels, and the top margin of a succeeding H1 is 28 pixels. Given all this, once the margins have been collapsed (or, if you prefer, overlapped), the distance between the end of the LI and the beginning of the H1XML documents are also quite naturally retrieved from a persistence layer (databases, file systems, XML stores). This lends XML to be used in real world applications where the information being used by different parts of a system is the most important thing.

XML is platform independent, textual information

Information in an XML document is stored in plain-text. This might seem like a restriction if were thinking of embedding binary information in an XML document. There are several advantages to keeping things plain text. First, it is easy to write parsers and all other XML enabling technology on different platforms. Second, it makes everything very interoperable by staying with the lowest common denominator approach. This is the whole reason the web is so successful despite all its flaws. By accepting and sending information in plain text format, programs running on disparate platforms can communicate with each other. This also makes it easy to integrate new programs on top of older ones (without rewriting the old programs), by simply making the interface between the new and old program use XML.

For example, if you have an address book document stored in an XML file, created on a Mac, that you would like to share with someone who has a PC, you can simply email them the plain text address book XML document. This cant be done with binary encoded information which is totally platform (and program) dependent.

Another example is web enabling legacy systems. It is very feasible to create a Java web ennoblement application server that simply uses the services provided by the underlying legacy system. Instead of rewriting the legacy system, if the system can be made to communicate results and parameters through XML, the new and old system can work together without throwing away a company's investment in the legacy system.

4.1. Manipulating Text

You may well wonder what the difference is between text and fonts.Simply put, text is the content. The font used to display it is justone more way of altering the appearance of the text. Before we getinto fonts, though, there are some simpler ways to affect theappearance of your text. Besides, some of the things we discuss herewill be important when we discuss the font properties, so it makesmore sense to discuss the text properties first.

paragraph to be bold, then all of its childrenwill inherit that boldness, as we see in
Figure 5-9.

P.one {font-weight: bold;}
Figure 5-9

Figure 5-9. Inherited font weight

This isn't unusual, but the situation gets interesting when youuse the last two values we have to discuss: bolderand lighter. In general terms, these keywords havethe effect you'd anticipate: they make text more or less boldwith comparison to its parent's font weight. Let'selements in a document to be one-and-one-half times theirfont-size. You would declare:

BODY {line-height: 1.5;}

This scaling factor of 1.5 is passed down fromelement to element, and at each level the factor is used as amultiplier of the font-size of each element.Therefore, the following markup would be displayed as shown in Figure 8-64 (backgrounds added for illustrative purposes):

P {font-size: 12px; line-height: 1.5;}