margin from the element box, as shown in Figure 8-5. The lack of any space between the borders ofeach paragraph is a result of auto beingreinterpreted as zero:

P {margin-top: auto; margin-bottom: auto;}
Figure 8-5

Figure 8-5. Automatically setting margins to zero Collapsing vertical margins

ringtone ringing games tone download mp3

Thursday 22nd of March 2018 04:36:31 PM


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;

H3 {color: gray; border-bottom: 3px solid;}

Since no border color is declared, the default value (the element's foreground) is applied instead, as we can see in Figure 7-48. Just remember that if you leave out a border style, the default value of none will prevent 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 of

The styles between the opening and closing STYLE tags are referred to as the document style sheet or the embedded style sheet , since this style sheet is embedded within the document. It contains styles that apply to the document, but it can also contain multiple links to external style sheets using the @import directive.

As of this writing, only Internet Explorer 4.5 and 5 for theMacintosh and Opera 3.6 will center elements usingauto margins.

The other possibility is when one of the margins and the width areset to be auto. In this case, then the margin setto be auto is reduced to zero:

P {width: auto; margin-left: auto; margin-right: 100px;}
shortened, because they do not replicate. For example, the value #880 expands to #888800, not #808000 (otherwise known as olive). Therefore, there is no shortened version of #808000, and the appropriate entry in the table is left blank.

You may recall the earlier discussion about how colors aren't always immediately follows another such element in the document'slayout.

A perfect example is an unordered list, in which the list itemsfollow one another. Assume that the following is declared for a listthat contains five list items:

LI {margin-top: 10px; margin-bottom: 15px;}

Thus, each list item has a 10-pixel top margin and a 15-pixel bottommargin. However, when the list is rendered, the distance between