Product Details
CSS Pocket Reference

CSS Pocket Reference
By Eric Meyer

Price:

This item is not available for purchase from this store.
Click here to go to Amazon to see other purchasing options.


13 new or used available from £0.01

Average customer review:

Product Description

CSS (Cascading Style Sheets) is the W3C-approved method for enriching the visual presentation of Web pages. CSS allows Web pages to become more structural, and at the same time promises that they can have a more sophisticated look than ever before. With good implementations in Internet Explorer 5.0 and Opera 3.6, and 100 per cent CSS1 support expected in Netscapes's Mozilla browser, signs are that CSS is becoming a useful, reliable, and powerful tool for Web authors. The "CSS Pocket Reference" briefly introduces CSS and then lists all CSS1 properties, plus the CSS1 pseudo-elements and pseudo-classes. Since browser incompatibility is the biggest obstacle to CSS adoption, there is also a comprehensive guide to how the browsers have implemented support for CSS1. For anyone who wants to correctly implement CSS, this is a condensed reference to all the details in the larger volume, "Cascading Style Sheets: The Definitive Guide".


Product Details

  • Amazon Sales Rank: #611805 in Books
  • Published on: 2001-06-11
  • Original language: English
  • Number of items: 1
  • Binding: Paperback
  • 96 pages

Editorial Reviews

About the Author
Eric A. Meyer has been working with the Web since late 1993. Although he spent most of that time as Hypermedia Systems Manager for Digital Media Services at Case Western Reserve University, he left CWRU in March 2000 to join an information technology firm in Cleveland, Ohio, which is a much nicer city than you've been led to believe. Eric has been called "an internationally recognized expert on the subjects of HTML and Cascading Style Sheets (CSS)." He is an Invited Expert and member of the W3C CSS&FP Working Group, coordinated the authoring and creation of the W3C's CSS Test Suite, remains active on CSS newsgroups, and edits Web Review's Style Sheets Reference Guide. He does as much writing as he can without burning out, and also does his best to keep up with CSS support in popular web browsers. If you have a taste for early jazz and swing, you can catch his weekly big band radio show over the Internet via WRUW-FM 91.1 in Cleveland. When not otherwise busy, Eric is usually bothering his wife Kat in some fashion.

Excerpted from CSS Pocket Reference by Eric A. Meyer. Copyright © 2004. Reprinted by permission. All rights reserved.
Basic Visual Layout
CSS defines algorithms for laying out any element in a document. These algorithms form the underpinnings of visual presentation in CSS. There are two primary kinds of layout, each with very different behaviors: block-level and inlinelevel layout.
Block-Level Layout
A block-level box in CSS generates a rectangular box called the element box. This box describes the amount of space occupied by an element. Figure 2 shows the various components of an element box. The following rules apply to an element box:
• The background of an element extends to the outer edge of the border, thus filling the content, padding, and border areas. If the border has any transparent portions (e.g, it is dotted or dashed), then the background will be visible in those portions.
• Only the margins, height, and width of an element box may be set to auto.
• Only margins can be given negative length values.
• The padding and borders of the element box default to 0 (zero) and none, respectively.
• The property width defines only the width of the content area; any padding, borders, or margins are added to it. The same is true for height.
Inline Layout
All inline elements have a line-height, which has a great deal to do with how the elements are displayed. The height of a line of text is determined by taking into account the following factors:
Anonymous text
Any string of characters not contained within an inline element. Thus, in the markup:

I'm so happy!


the sequences " I’m " and " happy!" are anonymous text. Note that the spaces are part of that text, since a space is a character like any other.
Em-box
The em-box defined in the given font; otherwise known as the character box. Actual glyphs can be taller or shorter than their em-boxes, as discussed in Chapter 5 of Cascading Style Sheets: The Definitive Guide, Second Edition. In CSS, the value of font-size determines the height of each em-box.
Content area
In nonreplaced elements, the content area can be the box described by the em-boxes of every character in the element, strung together, or else the box described by the character glyphs in the element. The CSS2.1 specification allows user agents to choose either. This text uses the em-box definition, for simplicity’s sake. In replaced elements, the content area is the intrinsic height of the element plus any margins, borders, or padding.
Leading
The leading is the difference between the values of font-size and line-height. Half this difference is applied to the top and half to the bottom of the content area. These additions to the content area are called, not surprisingly, half-leading. Leading is applied only to nonreplaced elements.
Inline box
The box described by the addition of the leading to the content area. For nonreplaced elements, the height of the inline box of an element will be equal to the value for line-height. For replaced elements, the height of the inline box of an element will be equal to the content area, since leading is not applied to replaced elements.
Line box
The shortest box that bounds the highest and lowest points of the inline boxes that are found in the line. In other words, the top edge of the line box will be placed along the top of the highest inline box top, and the bottom of the line box is placed along the bottom of the lowest inline box bottom.


Customer Reviews

Excellent as far as it goes5
It is exactly what it says, a pocket reference book. You cannot learn CSS from it so if you don't know much about style sheets yet you'd probably be better getting a more in-depth reference book that explains how to achieve particular effects in more detail. I use it all the time.

Simple but comprehensive.5
It starts with a VERY brief explanation of CSS selectors, inheritance, the box model, inline model, floating, positioning and the table model. Note that these don't substitute in any way the text in CSS, The Definitive Guide.
Then comes the CSS 1,2 and 2.1 properties reference, with the properties, values and their meaning. A very brief example is given for the property but it is only a snippet showing a selector using that property, nothing more. It is easy to search and, is small enough to be carried anywhere without causing much hassle.
It has the 10% that allows to do 90% of the work and is extremelly usefull to have around when writing Style Sheets.

Superb reference !5
Excellent buy for anyone who wants a quick, concise reference for CSS2 & CSS2.1. It gives good and simple examples of how to use the selectors with all their corresponding properties. Very easy to look up as it's all alphabetically listed.