title: Using :hover for an element's inline style (using HTML/CSS/php)
body: <blockquote>
    <p><strong>Possible Duplicates:</strong><br>
    <a href="https://stackoverflow.com/questions/131653/how-do-i-embed-an-ahover-rule-into-a-style-attribute-in-the-middle-of-a-d">How do I embed an &ldquo;a:hover{&hellip;}&rdquo; rule into a style attribute in the middle of a document?</a><br>
    <a href="https://stackoverflow.com/questions/1033156/how-to-write-ahover-in-inline-css">How to write a:hover in inline CSS?</a>  </p>
  </blockquote>
  
  
  
  <p>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)</p>
  
  <pre><code>echo '
  &lt;div class="container" style="color:#'.$color.'"&gt;
    '.$contents.'
  &lt;/div&gt;';
  </code></pre>
  
  <p>When the user hovers over this container element, the color style will change to the value of <code>$color</code> (at the moment there is no hovering).</p>
  
  <p>Any help would be appreciated.</p>