How do you go about altering a div css with coldfusion? I have css in a div that I need to alter once a counter variable hits a certain number.

I tried:



<cfif counter IS 10>
<style type="text/css">
div#blah {background-color:#999999}
</style>
</cfif>

This is placed within a loop. Of course at the end of the loop, 1 is added to the counter variable. Basically the loop makes the div repeat over and over down a list. But once the counter reaches 10, I need the background-color to change.

The code above changes all the previous divs in the list before counter=10 to the color stated in the if statement.