Site navigation below

Other link sections

Recommendations

This guide is part of the Code Style Anchor Points section, a collection of external links from across this site, split by subject.

The links in this section will take you away from this Web site. Please use this Code Style home page link to bookmark this site.

CSS newsgroups

The primary newsgroup for CSS for the World Wide Web is comp.infosystems.www.authoring.stylesheets (CIWAS). Subscribe, read the FAQ and lurk a while before posting. Regulars worth reading include the FAQ maintainer, Jan Roland Eriksson, Alan J. Flavell, Rijk van Geijtenbeek, Jukka K. Korpela, Matt McIrvin, Eric A. Meyer and Etan Wexler. Also watch for occasional postings by David Baron, Bert Bos and Todd Fahrner.

The Mozilla group for style matters is netscape.public.mozilla.style, and for Opera opera.page-authoring includes discussion of CSS and often has input from Opera staff, including Sue Sims, as well as some CIWAS regulars.

W3C recommendations

CSS syntax checkers

As you learn and practise CSS development you will undoubtedly fall foul of authoring errors and browser bugs. To identify and isolate which is which is a critical part of the learning process and will help you write stylesheets that work around the bugs, render correctly in conforming user agents and are forward-compatible.

Use the inappropriately named W3C CSS Validator to check the syntax of your stylesheet before pulling your hair out. A local installation for Java Development Kit 1.1 and above is also available from this location. Alternatively, check your stylesheet using the HTML Help CSSCheck by URL or direct input of the declarations.

Markup validators

As a safeguard against human (and software) fallibility, and for optimal CSS rendering, it is essential to ensure that your markup conforms to a specific DTD. The closer your chosen DTD is aligned to those recommended by the World Wide Web Consortium (W3C), the more likely your documents will work on any Web browser and help you isolate possible browser-specific problems.

Also beware that validation errors near the top of a document may create a cascade of spurious errors further down, so it is advisable to correct each in turn and re-validate as you go.

Favelets by Tantek  Çelik is a set of Javascript event handlers that can be saved as browser bookmarks to pass any current page to the W3C markup validator or CSS checker. A Real Validator by Liam Quinn is an offline version of the WDG validator that uses the same set of user-friendly help references to untangle your messed-up markup.

Finally, James Clarke's NSGMLS is the software that sits behind both the W3C and WDG validators. NSGMLS is part of the SP package of command line applications; it takes some learning to configure initially but is well worth the effort once you appreciate that no output means no errors! The installation archive includes all the W3C HTML DTDs and relevant SGML declarations.

See Validate your markup with SGMLS for a detailed guide to using this tool on Windows systems.

CSS browser bugs and workarounds

Regrettably, browser bugs are an inescapable part of working with CSS for the World Wide Web, but at least the most common bugs are the best known, and a great deal of effort has been expended recording the issues and noting the workarounds.

Another partial reference to CSS bugs is Matthew Haughey's CSS Horrors.

Hide CSS rules from selected browsers

A growing trend amongst advanced CSS authors is to use the shortcomings of problem Web browsers to hide style rules from them. Maintenance of such workarounds can be a long-term bind, and some rely on processing errors with arcane syntax. The politics of this approach is a debate in its own right, but the following sites will give you a start.

DOCTYPE interpretation

Netscape and Microsoft have chosen to fight the current round of the browser wars over W3C standards conformance, and both have adopted a similar twisted logic to accommodate legacy Web documents that may not have valid markup. Internet Explorer 5 for Mac, Netscape 6, Mozilla and Internet Explorer 6 for Windows apply stricter standards-based markup and CSS rendering if specific Document Type Declarations are used. Any document that doesn't match their criteria is assumed to be legacy "tag soup" and is rendered in quirks mode, but the interpretation of types varies between browsers.

CSS studies and examples

Cascading Style Sheets books

Cascading Style Sheets

Cover illustration of Cascading Style Sheets By Håkon Lie and Bert Bos

The authors of the W3C CSS recommendations' comprehensive, readable guide to stylesheet syntax, selectors and declarations; what they mean, how to use them and their intended effect. Not so strong on the practical issues of browser support, but the principles are clearly laid out and the insight of the authors is valuable in its own right.

Order this book online at Amazon UK

Cascading Style Sheets, The Definitive Guide

Cover illustration of Cascading Style Sheets, The Definitive Guide By Eric Meyer

As well as the principled introduction to the subject one would expect, this book has plenty of practical detail on browser compatibility issues and how to work around the worst of them.

Order this book online at Amazon UK

CSS Pocket Reference

By Eric Meyer

This handy, boiled down version of The Definitive Guide includes the key properties reference with compatibility notes and an overview of selector syntax.

Order this book online at Amazon UK

Article-specific anchors

The following links are also referenced from specific articles on the Code Style site.

CSS2 media style sheets

CSS3 Media Queries

Font sampler and survey references

The Code Style font sampler a guide to the most common fonts on Windows, Mac and Unix family operating systems, partly derived from the following Microsoft Typography references and other sources:

See also Alan Wood's Unicode fonts reference, and An easy way to install Microsoft's TrueType core fonts on Linux.

The CSS3 module: Fonts introduces a new font-size-adjust property based on the x-height ratio of the first named font. This working draft has a helpful illustration of that shows how this ratio affects the apparent size and legibility of a font.

See Anchor Points: Code Style for a digest of links from the site log.

Style warning - please read

Home · CSS · Java · Javascript · HTML · Help · Log