43
rated 0 times
[
44]
[
1]
/ answers: 1 / hits: 22550
/ 14 Years ago, fri, february 25, 2011, 12:00:00
Possible Duplicates:
How do I embed an “a:hover{…}” rule into a style attribute in the middle of a document?
How to write a:hover in inline CSS?
I want to dynamically change the hover colour of an element, but not using external CSS stylesheets, only inline. This is the code (using php to generate the element)
echo '
<div class=container style=color:#'.$color.'>
'.$contents.'
</div>';
When the user hovers over this container element, the color style will change to the value of $color
(at the moment there is no hovering).
Any help would be appreciated.
More From » php