Friday 19th of January 2018 12:54:09 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: M

margin-bottom property: 7.3.4. Single-Side Margin Properties
margin-left property: 7.3.4. Single-Side Margin Properties
margin property: 7.3. Margins
margin-right property: 7.3.4. Single-Side Margin Properties
margin-top property: 7.3.4. Single-Side Margin Properties
margins: 7. Boxes and Borders
7.3. Margins
collapsing: 7.3.5. Collapsing Margins
block-level elements: Collapsing vertical margins
floated elements: 7.6.1. Floated Elements
horizontal, noncollapsing: 8.2.2. Horizontal Formatting
inline elements and: 7.3.7. Margins and Inline Elements
caution with: 7.3.8. Margins: Known Issues
length values and: 7.3.1. Length Values and Margins
negative (see negative margins)
vs. padding: 7.2. Margins or Padding?
percentages and: 7.3.2. Percentages and Margins
replication: 7.3.3. Replicating Values
single side, setting margin for: 7.3.4. Single-Side Margin Properties
table cells and: 1.3.1. Limited Initial Scope
markers: 8.2.3. List Items
8.2.3. List Items
10.4.2. Markers
matching hyphenated values: Matching hyphenated values
matching single attribute values: Matching single attribute values
max-height property: Limiting width and height
max-width property: Limiting width and height
media types: 1.3.1. Limited Initial Scope
10.8. Media Types and @-rules
Microsoft Internet Explorer (see Internet Explorer)
middle alignment: In the middle
millimeters (mm): 3.2.1. Absolute Length Units
min-height property: Limiting width and height
min-max properties: Limiting width and height
min-width property: Limiting width and height
monospace fonts: 5.1. Font Families
multiple pages, using styles on: 1.2.3. Using Your Styles on Multiple Pages

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

A.grid {background-image: url(smallgrid.gif);}<P>This paragraph contains <A HREF="..." CLASS="grid">an anchor with abackground image</A> which is tiled only within the anchor.</P>
Figure 6-24

Figure 6-24. A background image on an inline element

There are a number of ways to employ this technique. You might placean image in the background of STRONG elements, inorder to make them stand out more. You could fill in the backgroundof headings with a wavy pattern, or with little dots. You can evenfill in the cells of tables with patterns to make them distinct fromthe rest of the page, as shown in Figure 6-25: usemap="#library-map" border="0" alt="Library Navigation Links" >

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

tag, the attributes and values are fairly straightforward.REL stands for "relation," and in thiscase, the relation is "stylesheet."TYPE is alwaysset to text/css. This value describesthe type of data that is to be loaded using theLINK tag. That way, the web browser knows that thestyle sheet is a CSS style sheet, a fact that will determine how thebrowser deals with the data it imports. After all, there may be otherstyle languages in the future, so it will be important to say which the great-grandchild of an LI that is the directchild of the OL, and the OL isthe grandchild of the BODY element. The firstEM is not matched because its grandparentOL is not the direct child of aDIV.

Even better, you can string more than one child selector together toprecisely target a given type of element. Take this, for example:

Courier and Times Roman--but browsers that don't have the font you specify will simply substitute some other font, and the effect you want may be diminished or lost.  The <BASEFONT> or <FONT> tags can list multiple fonts in order of preference.  The list should include a generic font family as a last resort, e.g.
   <FONT FACE="Creepy, Times New Roman, serif">
Generic font families include serif, sans-serif, monospace, cursive and fantasy

Note that as of HTML 4, you are encouraged to use style sheets instead

11.2.1. Making Styles Work

This is an easy one. If you wantNavigator 4 to use CSS at all, you have to go to the preferencesdialog and check the boxes for both style sheets and JavaScript. IfJavaScript is disabled, Navigator will not apply styles. Why? In theearly days of style sheets, there were a number of proposals for