W3C home > Mailing lists > Public > www-style@w3.org > May 2006

[CSS2 counters] Is it possible to evaluate a value inside CSS?

From: Daniel MD <danielmendes@im-thinking.com>
Date: Mon, 15 May 2006 18:39:15 +0100
Message-Id: <>
To: www-style@w3.org


I am trying to do some tricks in CSS, one of them is to use different 
bullet images programmatically using a CSS counter, so i have a 
folder called bullets with 1.gif, 2.gif, etc.... I don't know if it 
is possible to do in CSS, i have tried several ways but i think i am 
not getting the way the list gets created... or perhaps this is not 
possible, what i want to do is for the content: propriety to 
evaluate/return url(1.gif) [see code below]

Using it directly (content:url(1.gif)) works fine... is there a way 
to do this, how do i create a "fake" variable with a counter?

ol {
	counter-reset: list 0;
	content: url( counter(list,decimal).gif ); //also tried 
	counter-increment: list;

Received on Monday, 15 May 2006 18:30:26 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:24 UTC