HostOnNet Blog

Changing background on hover using CSS Classes

Looking for Linux Server Admin or WordPress Expert? We can help.

hover-effects

The program changes the background colour of a link when mouse is over the link. Tested in Internet Explorer browser.

<html>
<head>
<title>Changing background on hover using CSS Classes</title>
<style type="text/css">
.hlink {
display block;
width:150px;
height:20px;
background-color:white;
text-align:center;
text-decoration:none;
}
.hlink:hover {
color:white;
background-color:blue;
}
</style>

<html>
<body>

<a class="hlink" href="http://hostonnet.com/"><B><CENTER>Welcome to HostOnNet.com</CENTER></B></a>

</body>
</html>

About ramesh xavier

Hi I am Ramesh Xavier I have a passion for designing detailed, creative and modern websites, I have been working as web-designer for over 4 years, and have done lots of work over that time, I'm always keeping an eye on the latest trends over typography, shapes, colours, etc..
Posted in Web Design

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.