Image Hovering..


If u have a div with a background image and u want that to display a new image on hover, u can use the following. This helps to remove the use of <img src> inside the <a href></a> tag.

Here is the html script:

<a href=””><div id=”iconhoarding”>
</div></a>

The style sheet is as follows:

#iconradio{
width:112px;
height:89px;
float:left;
background-image:url(../images/icon_radio.png);
}

#iconhoarding:hover{
background-image:url(../images/icon_stall.png);
}

Cheers…!!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s