2003-08-11

Alexander Becker

CSS3 Attribute Selectors

Problem:

Selecting the h4 contained in the first item of the first of two dynamical lists within a div. Each list is preceded by an h3 with a unique id.

Title

Title

Solution:

div#test h3[id="a"] + ul li:first-child h4 {
font-family: Georgia, serif;
text-transform: uppercase;
letter-spacing: 0.2em;
}

Note:

Works in Mozilla, Camino, Netscape… Does not work in IE.

© Copyright 1999 - 2011 kokhaviv publications