Wednesday 25th of November 2015 05:08:30 AM

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: 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 of the text is the same size. Just to cover all the bases, though, it might make more sense to simply increase the line-height of the anchor element itself, like this:

A:link {border: 5px solid blue; line-height: 24px;}
P {font-size: 14px;}

If all the content of a line is text of the same size, then the line box is always as tall as the biggest line-height value contained within that line box (since this will coincide with | Q | R | S | T | U | V | W | X | Y | Z

Library Navigation Links

Copyright © 2002 O'Reilly & Associates, Inc. All Rights Reserved.

spans the width of the parent, and so does the background. The actual content doesn't flow all the way across its own content area in order to avoid being obscured behind the floating element. Negative margins

As was discussed in the previous chapter, negative margins can cause floated elements to move outside of their parent elements. This seems to be in direct contradiction to the rules explained earlier, but it isn't. In the same way that

However, maybe we'd like to place the change marker next towhatever line was changed. In that case, we need to make only onesmall alteration to our styles, and we'll get the result shownin Figure 9-22:

SPAN.change {position: absolute; top: static-position; left: -5em; width: 4em;font-weight: bold;}P {margin-left: 5em; position: relative;}<P> Lorem ipsum, dolor sit amet, consectetuer adipiscing elit,sed diam nonummy nibh euismod tincidunt ut <SPAN CLASS="change">***</SPAN>

In order to understand this more clearly, let's look at threeexamples of font-weight assignment. In the first, assume that thefont family Karrank% is an OpenType font and so already has nineweights already defined. In this case, the numbers are assigned toeach level, and the keywords normal andbold are assigned to the numbers400 and 700, respectively.

As a matter of fact, the rule for A:hover would be used while the pointer hovers over any anchor, not just a hyperlink. While some other pseudo-classes, like :link and :visited , are constrained to the A element in HTML, the same is not true of :hover. User agents could, in theory, allow the assignment of hover styles to any element, like this:

P:hover {font-weight: bold;}

Therefore, if you want to make sure your hover styles are applied