stavros-s
3/29/2013 - 10:50 PM

CSS: A text rollover with CSS

CSS: A text rollover with CSS

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN”

“http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>

<html xmlns=”http://www.w3.org/1999/xhtml”>

<head>


<title>CSS Text Rollover</title>

<meta http-equiv=”Content-Type” content=”text/html; charset=ISO-8859-1” />

<style type=”text/css”>


h4 
{
	font: 18px geneva, sans-serif;
	margin: 0;
	color: #000;
	background: #FFF;
}




a 
{
	text-decoration: none;
}


div#navbar 
{
	width: 100px;
}


div#navbar a 
{
	display:block;
	margin: 0;
	padding: 0.3em;
}


div#navbar a:hover
{
	background: #FFF;
	color: #000;
}


div#navbar a:link 
{
	color: #000;
	background-color: transparent;
}


div#navbar a:link:hover 
{
	color: #FFF;
	background: #000;
}



div#navbar a:visited 
{
	color: #CCC;
	background-color: transparent;
}



div#navbar a:visited:hover 
{
	color: #CCC;
	background: #000;
}



</style>


</head>


<body>


<div id=”navbar”>

	<h4><a href=”index.html”>Home</a></h4>
	<h4><a href=”aboutMe.html”>About Me</a></h4>

</div>


</body>


</html>