Thursday 23rd of March 2017 09:01:47 PM

Book Home

Cascading Style Sheets: The Definitive GuideSearch this book

Symbols | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

Index: X

x-height: 3.2.2.1. em and ex units
XML (Extensible Markup Language): 1.2.6. Preparing for the Future
display property and: 2.9.1. Why Does the display Property Exist?
selectors in: 2.1.2. Simple Selectors


Symbols | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z


Library Navigation Links

Copyright © 2002

8.3.2.1. Negative margins

As was discussed in the previous chapter,negative margins can cause floated elements to move outside of theirparent elements. This seems to be in direct contradiction to therules explained earlier, but it isn't. In the same way thatelements can appear to be wider than their parents through negativemargins, floated elements can appear to protrude out of theirparents.

O'Reilly & Associates, Inc. All Rights Reserved.

background image that is all the way to the right side of an element and 10 pixels down from the top, as illustrated in
Figure 6-44. As always, the horizontal value comes first:

BODY {background-image: url(bg23.gif);
background-repeat: no-repeat;
background-position: 100% 10px;}
Figure 6-44

Figure 6-44. Mixing percentages and length values

You cannot, however, mix keywords with other values. Thus, top 75% is not valid. If you use a keyword, you're stuck using only keywords, understanding the next section.

Figure 6-48

Figure 6-48. Use of the background-position property sets the origin of the tiling pattern

As it happens, the positioning of backgrounds does contradict something I said earlier. background-position is the only background property with restrictions, as it may only be applied to block-level and replaced elements; background image positioning cannot be done on inline elements such as hyperlinks.