Class attribute values - Page 2

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Re: Class attribute values

Toby Inkster wrote:
Quoted text here. Click to load it

Yes you can, it's just not as clear as the attribute selector. This
works for the class name "0.4"

.\.4 { color: green; }

(note: 30 is the hex code point for digit 0)

Lachlan Hunt / Rediscover the Web Reclaim your Inbox

Re: Class attribute values

On Mon, 07 Nov 2005 07:27:04 GMT, Patient Guy

Quoted text here. Click to load it

Well, I couldn't immediately find something prohibiting that. However:

class="thumbedImage 0.4"  assigns the classes "thumbedImage" and "0.4"
to the element.

In CSS, img.0.4 { ... }  would refer to images having the class 0 and
the class 4.

In fact in CSS:  "identifiers (including element names, classes, and IDs
in selectors) can contain only the characters [A-Za-z0-9] and ISO 10646
characters 161 and higher, plus the hyphen (-); they cannot start with a
hyphen or a digit."

Even if you can use periods in HTML class-names, it seems to me that it
would be inadvisable.

Stephen Poley /

Site Timeline