Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Validateur css

5 réponses
Avatar
Le Fou
Salut,

Le validateur css http://jigsaw.w3.org/css-validator/validator-uri.html n'a
pas l'air d'apprécier ma page
http://ffessm.cd84.free.fr/cd84.css
C'est quoi qu'il n'aime pas ? le "_" dans "#c2_bas" ? Ou autre chose ?

--
A'tchao

Le Fou
http://club.exocet.free.fr/
http://perso.club-internet.fr/ehiller/

5 réponses

Avatar
A. L.
Le Fou wrote:

"En CSS2, les identifiants (ainsi que les noms des éléments et ceux des
classes et des IDs des sélecteurs) ne peuvent contenir que les caractères
parmi [A-Za-z0-9] et ISO 10646 supérieurs à 161, ainsi que le tiret (-) et
le souligné (_) ; "

Il est vrai que dans la version officielle en anglais le "souligné" n'est
pas mentionné...



http://www.w3.org/TR/CSS21/syndata.html#q4

« In CSS 2.1, 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 (-) and the
underscore (_); they cannot start with a hyphen or a digit. They can
also contain escaped characters and any ISO 10646 character as a
numeric code (see next item). For instance, the identifier "B&W?" may
be written as "B&W?" or "B26 W3F". »

--
Arnaud,
http://al.blog.typhon.net/
Avatar
Lars Trebing
ho alexandre wrote:

[...] j'ajouterai que l'utilisation du caractère '_' dans un nom CSS
est plus que fortement déconseillé.



Il y a par exemple les vieux Netscape (4.x) qui ignorent complètement
les noms CSS contenant des "_".

--
Lars Trebing | http://www.ltrebing.de/ | mailto:
Avatar
Marc.Mongenet
Lars Trebing wrote in message news:<bg6po2$la6of$...
ho alexandre wrote:

> [...] j'ajouterai que l'utilisation du caractère '_' dans un nom CSS
> est plus que fortement déconseillé.

Il y a par exemple les vieux Netscape (4.x) qui ignorent complètement
les noms CSS contenant des "_".



C'est normal car Netscape 4.x suit la recommandation CSS1.
Pour une fois que Netscape 4.x ne fait pas n'importe quoi,
ça mérite d'être souligné.;-)

<http://www.w3.org/TR/REC-CSS1>
in CSS1, selectors (element names, classes and IDs) can contain only
the characters A-Z, 0-9, and Unicode characters 161-255, plus dash
(-); they cannot start with a dash or a digit; they can also contain
escaped characters and any Unicode character as a numeric code (see
next item).

Marc Mongenet
Avatar
Pascal Chevrel
Le 31/07/2003 12:30, Le Fou a écrit :
A. L. a écrit

Le Fou wrote:

Il est vrai que dans la version officielle en anglais le "souligné"





n'est

pas mentionné...



http://www.w3.org/TR/CSS21/syndata.html#q4

« In CSS 2.1, 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 (-) and the
underscore (_); they cannot start with a hyphen or a digit. They can
also contain escaped characters and any ISO 10646 character as a
numeric code (see next item). For instance, the identifier "B&W?" may
be written as "B&W?" or "B26 W3F". »




Exact !
Je m'en étais arrêté à la version 2 où le "underscore" (_) n'est pas
mentionné :
http://www.w3.org/TR/CSS2/syndata.html#q4
Merci.



En fait c'est mentionné dans CSS2, il y a eu un errata :
http://www.w3.org/Style/css2-updates/REC-CSS2-19980512-errata.html

Pascal

--
FAQ Mozilla/Netscape 7 en français : http://pascal.chevrel.free.fr/
Drag me, drop me, treat me like an object
Avatar
ho alexandre
Le Fou wrote:
Autre chose : ? serait bien que tu indiques l'encodage utilis?dans tes
messages.



Alphabet occidental (ISO).
Pourquoi ?



lol non ce n'est pas moi que tu dois l'indiquer. Tu dois dire à ton
logiciel de l'indiquer pour que les autres te lisent corectement.
Par ailleurs tu n'utilises pas Alphabet occidental mais Windows-1252
visiblement (ce qui est mal te n'apporte rien de plus que ISO-8859-1).

--
Xandrex