Home > Store

Core CSS: Cascading Style Sheets

Register your product to gain access to bonus material or receive a coupon.

Core CSS: Cascading Style Sheets

Book

  • Sorry, this book is no longer in print.
Not for Sale

About

Features

  • CSS Web site integration.
    • Provides students with practical techniques for integrating CSS into their Web site development. Ex.___

  • Style sheet codes.
    • Provides students with expert insight into choosing the right codes. Ex.___

  • Compatability listings.
    • Enables students to identify CSS compatibility across browsers and operating systems so that they can determine which CSS properties are appropriate to use. Ex.___

  • Professional-level code examples.
    • Provides students with real-world, practical information. Ex.___

  • Comprehensive browser and platform compatibility information.
    • BENEFIT NEEDED. Ex.___

  • Full CSS1 and CSS2 property listings.
    • BENEFIT NEEDED. Ex.___

  • Key CSS2 families of properties.
    • Familiarizes students with aural style sheets, automatically generated content, and user interface properties. Ex.___

  • Color palette information.
    • BENEFIT NEEDED. Ex.___

  • Compatibility charts.
    • BENEFIT NEEDED. Ex.___

  • Core Note, Alert and Tip icons.
    • Focuses students' attention on information that deserves special attention, may cause unexpected results, or will save students' time. Ex.___

Description

  • Copyright 2000
  • Edition: 1st
  • Book
  • ISBN-10: 0-13-083456-4
  • ISBN-13: 978-0-13-083456-0

  • The experienced developer's guide to CSS1 and CSS2!
  • Comprehensive browser and platform compatibility Info
  • In-depth examples throughout, plus an extensive CSS1/CSS2 reference section

The expert Web developer's guide to style sheets: CSS1 and CSS2!

Core CSS is an example-rich guide that shows experienced Web developers exactly how to achieve great results with CSS1 and CSS2!

In this example-rich book, Keith Schengili-Roberts shows experienced Web developers all they need to know to achieve great results with the latest style-sheet technologies. Schengili-Roberts provides in-depth coverage of both CSS1 and the recent CSS2 standard, taking care to explain the differences between the two. Understand key CSS2 families of properties, including aural (sound-based) style sheets, automatically generated content, user interface properties and much more.

This book is the most comprehensive listing available on CSS compatibility across browsers and operating systems, so Web masters can finally know what CSS properties are "safe" to use.

Detailed appendices provide full CSS1 and CSS2 property listings, color palette information, compatibility charts and more.

Every Core Series book:

  • DEMONSTRATES how to write commercial quality code
  • FEATURES dozens of nontrivial programs and examples-no toy code!
  • FOCUSES on the features and functions most important to real developers
  • PROVIDES objective, unbiased coverage of cutting-edge technologies-no hype!

Core CSS delivers:

  • Practical techniques for integrating CSS into your Web site development
  • Expert insight into choosing the best style sheet code
  • Hundreds of professional-level code examples
CD-ROM

The accompanying CD-ROM includes all of the book's detailed code examples.

Sample Content

Downloadable Sample Chapter

Click here for a sample chapter for this book: 0130834564.pdf

Table of Contents

I. THE ORIGINS OF CASCADING STYLE SHEETS.

 1. The Beginning of HTML and the “Browser Wars.”
 2. HTML and its Relationship to CSS.
 3. Browser Adoption of CSS.

II. CSS1.

 4. Overview.
 5. Implementation of Basic CSS Concepts.
 6. The Cascade.
 7. CSS Units.
 8. Pseudo-Classes and Pseudo-Elements.
 9. Font Properties.
10. The Color and Background Family of Properties.
11. The Text Family of Properties.
12. The Box Family of Properties.
13. The Classification Family of Properties.

III. CSS2.

14. Overview.
15. Selectors, Pseudo-Elements, and Pseudo-Classes.
16. New Media Types.
17. The Box Family of Properties.
18. Visual Formatting Family of Properties.
19. Detailed Visual Formatting Family of Properties.
20. Visual Effects Properties.
21. General Content, Automatic Numbering and Lists.
22. Paged Media Family of Properties.
23. Font Family Properties.
24. Text Family Properties.
25. Table Family Properties.
26. User Interface Properties.
27. Aural Style Sheet Properties.

APPENDICES.

A. CSS1 Property, Pseudo-Element, Pseudo-Class, and Concepts Reference.
B. CSS2 Property, Pseudo-Element and Pseudo-Class Reference.
3. Colors, Units of Measure, Percentage Units and URLs.
Index.

Preface

Preface

Welcome to Core CSS. Though Cascading Style Sheets (CSS) have been around for a few years now, it is still underutilized on the Web. The original CSS specification was released by the World Wide Web Consortium back in December of 1996. Since then both Microsoft and Netscape have been slow to implement CSS fully in their respective browsers, and at the time of writing (November 1999) neither the current versions of Internet Explorer nor Netscape Navigator implement CSS fully. Despite this, there are real signs that there is a real drive to make CSS a critical part of Web design in the near future. Browser manufacturers like Opera have pushed for full CSS compatibility, and Netscape has made real efforts to incorporate CSS1 fully and parts of CSS2 into Mozilla, the "precursor" browser to the final release of what will one day become Netscape Navigator 5.0.

Web authors are beginning to realize that CSS provides the power they have been asking for in order to have greater control over how things appear and work on screen. Part of being able to use this power is to understand how it all works. That's where this book comes into the picture.

Who You Are

You are a Web author who is looking to expand the capabilities of your Web pages. You know that CSS opens the doors to a wide range of possibilities, but want to learn more about how to make the most of it. Or perhaps you know that CSS will solve some of your most pernicious Web formatting problems, but shy away from using it because you have heard that it can produce varying results when viewed under different browsers or under different operating systems. If you fit either of these circumstances, then this book is for you.

Arguably one of the reasons why CSS has not been adopted as quickly as many other Web technologies have been is the lack of good, solid information as to how it should work. There is also a wide disparity between how CSS is supposed to work, and how it actually works in the major browsers.

This book takes a practical, pragmatic look at the current state of affairs regarding CSS, and guides the reader through how CSS works. This book provides the information Web authors need in order to understand not only how CSS should work, but how it actually works in current major browsers. It does not confine itself only to one operating system, but takes a look at how CSS works under browsers working under multiple operating systems. With this knowledge, Web authors will know what CSS properties are "safe" for use, and which to avoid.

More than that though, this book also provides information as to the future of CSS with an in-depth look at CSS2. CSS2 is a relatively recent specification that takes the original CSS specification further, bringing the Web to new display devices, providing much greater control over the positioning of onscreen elements, even providing Web authors with the control as to how Web pages should sound and much more. Browser support for CSS2 is limited at the moment, but it promises to come to the fore in the near future. This book provides the Web author with a guide as to what to expect when CSS2 is widely implemented.

You do not have to be an expert at understanding how the Hypertext Markup Language (HTML) works, but the book does assume you have a basic understanding of both HTML and the Web. The book assumes no prior knowledge of CSS. It will not only serve those Web authors who are just starting out using CSS, but should stand in good stead as a handy reference for those occasions when you need to look up how a particular CSS property works.

How This Book Is Organized

This book is divided into three parts, with a number of appendices designed to provide the Web author with quick reference material to have on hand when writing CSS code.

Part One, "The Origins of Cascading Style Sheets," begins by looking at how HTML developed, and the "browser wars" that necessitated the need for Cascading Style Sheets, in an attempt to rein in the burgeoning number of HTML tags unleashed onto Web authors by Microsoft and Netscape. It also looks at the role of the World Wide Web Consortium and the underlying goals behind the development of the first CSS specification. The relationship between HTML and CSS is then explored, looking at the ways in which CSS code can be incorporated into Web pages using such HTML tags as <STYLE>, <SPAN>, <DIV> and <LINK> and the HTML attributes STYLE, CLASS and ID. The concept of "cascading" is also explained in brief with its many rules plainly laid out. The final chapter in this part looks at how CSS is actually implemented in various releases of the major browsers.

Part Two, "CSS1," is devoted wholly to explaining all of the properties belonging to the CSS1 specification in detail. At the same time, the practical uses for each CSS1 property are also emphasized, along with code examples and information explaining any known quirks as to how (or if) a specific CSS1 property's functionality is implemented in a current browser. This part is broken down into nine chapters, each exploring a section of the CSS1 specification and its properties. The first four chapters explore some CSS fundamentals and how well they work in current browsers. Chapter 5 ("Implementation of Basic CSS Concepts") and Chapter 6 ("The Cascade") look at how well these basic concepts (such as inheritance, grouping CSS code and cascading rules) are implemented in the major browsers. Chapter 7 ("CSS Units") looks at and explains the many different fundamental units of measure that can be used in conjunction with certain CSS properties. The remaining chapters in this part proceed to cover the CSS1 properties and their functionality in detail. Chapter 8 ("Pseudo-Classes and Pseudo-Elements") looks at how pseudo-classes and pseudo-elements can be utilized. Chapter 9 ("Font Properties") looks at the many font-related properties in detail, explaining how they can be used to precisely lay out the type of font display to be seen by the user. Chapter 10 ("The Color and Background Family of Properties") examines how the versatile family of COLOR and BACKGROUND properties can be used effectively. Chapter 11 ("The Text Family of Properties") discusses how the many text-related CSS properties can be used to control how text is displayed onscreen. Chapter 12 ("The Box Family of Properties") explains and examines the box set of CSS properties, which determine how a wide variety of Web elements such as headers, images and paragraph can have their appearance enhanced. Finally, Chapter 13 ("The Classification Family of Properties") looks at those properties designed to fundamentally alter the way in which certain onscreen elements are to be displayed within the browser.

Part Three, "CSS2," examines how the properties of this relatively recent specification are to be used. The CSS2 specification is meant as an additional standard built on top of the CSS1 specification, and is meant to be an adjunct to it. Since many of the properties in the CSS2 specification are already defined and explained in Part Two, only those properties that are wholly new to CSS2 are covered. This part is broken down into a total of 14 chapters. As with the previous part, the first three chapters of this part are devoted to some CSS2 fundamentals. The first chapter ("Overview") provides a concise summary of the new features introduced under the CSS2 specification. Chapter 15 ("Selectors, Pseudo-Elements and Pseudo-Classes") looks at the powerful new selectors, pseudo-elements and pseudo-classes that are available for use. Chapter 16 ("New Media Types") introduces the concept of media types, and examines how Web pages can be modified so that they can be displayed in other media such as print or "talking browsers". All of the remaining chapters of this part look in turn at all of the new or significantly enhanced CSS properties. Chapter 17 ("The Box Family of Properties") looks at the important changes made to this important family of properties as well as the many new properties that are introduced under the CSS2 specification. Chapter 18 ("Visual Formatting Family of Properties") peers at the properties comprising this new family of functions that gives Web authors much greater control over how things appear onscreen. Chapter 19 ("Detailed Visual Formatting Family of Properties") deals with those properties that are meant to handle the fine details in the display of many onscreen elements. Chapter 20 ("Visual Effects Properties") looks at those properties designed to enable Web authors to control how text or other Web elements are displayed when they exceed the dimensions of the box within which they are contained. Chapter 21 ("Generated Content, Automatic Numbering and Lists") explains how the new functions that are provided with CSS2 enable Web authors to control and enhance content that is automatically generated by the browser, including such things as the numbering and display of lists. Chapter 22 ("Paged Media Family of Properties") explores those elements related to crafting Web pages so that they can be printed in the precise way that a Web author desires. Chapters 23 and 24 ("Font Family Properties" and "Text Family Properties") look at those new and expanded properties introduced under CSS2 to the font and text families of properties respectively. Chapter 25 ("Table Family Properties") looks into this new class of properties that provide greater control over how tables should be displayed onscreen. Chapter 26 ("User Interface Properties") examines another new class of properties designed to provide greater control over the display of such things as cursors and the outlines that surround such things as buttons or text fields in forms that denote a "focus" for user input. The final chapter, Chapter 27 ("Aural Style Sheet Properties"), explores a new class of properties designed to enable the Web author to determine how a Web page could be spoken aloud by a browser with speech capabilities.

There are a number of appendices that are designed as a quick reference for Web authors who need to look up how a particular CSS property functions, and whether or not it is supported in the major browsers. Appendix A is devoted to an alphabetical listing of all CSS1 properties, their values, plus sample code and whether or not it is supported in the major browsers. Similarly, Appendix B is an alphabetical listing of all CSS2 properties and their values plus sample code demonstrating how each property is to be used. Appendix C looks briefly at all of the ways colors can be implemented in CSS, as well as the ways various units of measure, percentage units and URLs can be used.

There is also a set of color-coded charts detailing those CSS1 properties and functions that have and have not been adopted within the various versions of the major browsers. These are designed as "spot" guides to tell a Web author whether or not a particular CSS1 property is "safe" to use. There are three such color charts: the first lists only the "safe" CSS1 properties, the second lists only the "unsafe" CSS1 properties and the final chart displays all CSS1 properties, "safe" and "unsafe".

Further Information

CSS is an ever-evolving subject. At the time of writing, the processes were already set in motion to produce an official specification for CSS3, but were in too early a state to be covered effectively in this book. The definitive place to find information about CSS is the extensive material devoted to the official specifications that can be found at the World Wide Web Consortium's Web site, which can be found at:

http://www.w3.org/Style/CSS

It is also a good idea for any Web master to keep abreast of the latest developments in browser technology. The two acknowledged major players in the industry are Netscape and Microsoft. You can find out more about the latest CSS developments in Netscape Navigator by going to Netscape's home page at:

http://home.netscape.com

You can find out more information about how CSS can be used with Microsoft's Internet Explorer from Microsoft's Internet Explorer Web site at:

http://www.microsoft.com/windows/ie

(A minor caveat - to the annoyance of many, Microsoft is well known for frequently changing the URLs of major sections of their Web site. If this URL does not work, try going to the Microsoft home page at http://www.microsoft.com and begin looking for links about Internet Explorer.)

It is also worth pointing out where to find information about the two other browsers referenced in this book, both of which (at the time of writing) incorporate more CSS functionality than either Netscape Navigator or Internet Explorer. Both of these browsers would make for good additions to a Web master's "toolbox" when checking whether your CSS code functions the way you want it to. Opera is a browser that almost fully understands all CSS1 code, and more information about it can be found from Opera Software's Web site at:

http://www.opera.com

Mozilla is a project of Netscape Corporation to produce a browser incorporating open standards such as CSS. The latest version of their browser understands CSS1 and a major portion of CSS2. It is fully expected by many to lay the groundwork for the much-anticipated Netscape Navigator 5.0. More information about the Mozilla browser can be found at:

http://www.mozilla.org

For people seeking more information as to how CSS can be used, there is a single Usenet newsgroup wholly devoted to the subject that is well worth checking out:

comp.infosystems.www.authoring.stylesheets

Feedback

No book is perfect and this one is unlikely to be an exception to that rule. Even though it has been through a long period of revision and technical review, there are, of course, errors still to be found and improvements still to be made. If you find an error or if there is something that you think might make the book more useful, we want to know about them. Please send comments and corrections to the following e-mail address:

robertsk@wave.home.com 

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020