php - Inline hover on Div -


hi trying run while loop database display number of different records, way record displayed through different images, therefore cannot customize using standard css , doing through inline css, have got point displays each image fine, won't display new image on hover user, here line div concerned

<div id="house_wrapper" style="background-image: url(images/houses/<?php print "$house_name";?>.png); :hover{background-image: url(images/houses/<?php print "$house_name";?>_hover.png)};"></div><!---end house_wrapper---> 

and here code entire while loop

    <div id="house_summary_content">    <?php            $query = mysql_query("select * user_houses user_id='$user_id'");            while($row = mysql_fetch_assoc($query)) : ?> <?php extract($row);?> <?php $sql_house = mysql_query("select * houses house_id='$house_id'"); $house_array = mysql_fetch_assoc($sql_house); $house_name = $house_array['house_name'];?> <div id="house_wrapper" style="background-image: url(images/houses/<?php print "$house_name";?>.png); :hover{background-image: url(images/houses/<?php print "$house_name";?>_hover.png)};"></div><!---end house_wrapper--->    <?php endwhile ?>  </div><!---end house_summary_content---> 

thanks guys can give

could possibly use javascript through onmouseover , onmouseout? example:

<div id="house_wrapper" style="background-image: url(http://i.imgur.com/f5ijy.jpg);width:100%;height:400px;" onmouseover="this.style.backgroundimage='url(http://i.imgur.com/ypjyg.jpg)';" onmouseout="this.style.backgroundimage='url(http://i.imgur.com/f5ijy.jpg)';"></div>​ 

demo http://jsfiddle.net/uvphp/9/


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -