CSS 2.1 selectors

27 September 2005 · 0 comments

Roger Johansson of 456 Berea Street has written the first of three articles on CSS 2.1 selectors The good news is that Internet Explorer 7 will have much better support for selectors. Knowing that you will be able to put them to good use in the future, now is as a good a time as [...]

Roger Johansson of 456 Berea Street has written the first of three articles on CSS 2.1 selectors

The good news is that Internet Explorer 7 will have much better support for selectors. Knowing that you will be able to put them to good use in the future, now is as a good a time as any to learn about the full range of selectors that are available.

Since there are so many CSS selectors, a single article explaining them all would become very long. To make the information easier to digest I have split this into three parts:

  1. Part 1, this article, explains the basics of selectors plus the universal, type, id, and class selectors.
  2. Part 2 is about combinators, combined selectors, grouping, and attribute selectors.
  3. Part 3 will be all about pseudo-classes and pseudo-elements.

I will post the articles over a couple of weeks and update each of them with links to the other parts as they are published.

This is a good, concise summary that contains a handy reference chart of child, sibling and descendant selectors, as well as matching attribute values and so on.

Be the first to comment ⇒

Tell us what you think.
Note: there may be a delay before your comment appears. I now approve all comments from new visitors, in an attempt to keep spam at bay.

Add your Comment

Older Post:

Newer Post: