What is the proper CSS syntax for implementing multiple pseudo classes I left the last one after each item in the list I want to include "," I am using the following CSS:
ul.phone_numbers li: {content: ","; } Ul.phone_numbers li: last-child: {content: ""; }
It works fine on FF3, Chrome and Safari 3. IE7 does not work because it does not support: after (expected). In IE8, it renders with comma after every Lee with the previous Lee. Is this a problem with IE8 or is my syntax wrong? This is fine if it does not work in IE8, but I would like to know what is the proper syntax.
: last child
is a pseudo-class, while : After
(or :: after
in CSS3) is a pseudo-element. / P>
Excerpt:
Pseudoscopes are allowed anywhere in the selectors, whereas the pseudo elements can be added only after the last simple selector of the selector.
This means that your syntax is correct as per CSS2.1 and, that is IE8 still useless;)
Comments
Post a Comment