Product Details
CSS Pocket Reference (Pocket Reference (O'Reilly))

CSS Pocket Reference (Pocket Reference (O'Reilly))
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.


12 new or used available from £1.58

Average customer review:

Product Description

More proof that good things come in small--and sometimes even inexpensive--packages: the CSS Pocket Reference has been completely revised and updated to reflect the latest Cascading Style Sheet specifications, CSS2 and CSS2.1. An indispensable reference for web designers and developers, this slim little book covers the essential information needed to effectively implement CSS, with an introduction to the key concepts of CSS and a complete alphabetical reference to the CSS2 and CSS 2.1 properties. And since browser incompatibility is the biggest CSS headache for most developers, it also includes an invaluable chart displaying detailed information about CSS support for every style element across all browsers. For anyone who wants to correctly implement CSS, this book condenses all the details in its companion volume, Cascading Style Sheets: The Definitive Guide, into one easy-to-use cheat-sheet. The CSS Pocket Reference delivers just the CSS details that you need to complete the task at hand. When you're stuck and want an answer quickly, the tiny CSS Pocket Reference is the book you'll want by your keyboard or in your back pocket. (Yes, it really does fit in a back pocket, but it's too useful to stay there long.)


Product Details

  • Amazon Sales Rank: #243102 in Books
  • Published on: 2004-07-27
  • Original language: English
  • Number of items: 1
  • Binding: Paperback
  • 128 pages

Editorial Reviews

Review
"If you need a small reference for CSS, you'll want this pocket reference. It does exactly what you would expect of a pocket reference, and does it well." - Sam Smith, news@UK

About the Author
Eric is the author of the critically acclaimed online tutorial Introduction to HTML, as well as some other semi-popular Web pages. He is a member of the CSS&FP Working Group and the author of Cascading Style Sheets: The Definitive Guide.

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.