Re: width and height

In this sample :hover doesn't work properly, it moves down for 1px,
what would be solution to this?

<!DOCTYPE HTML>
<html>
<head>
<style type="text/css">
#css {
	text-align:center;
	font-size:20px;
	background-color:white;
	width:400px;
	height:100px;
	border: 1px solid red;
	-moz-border-radius:20px;
}
#css a {
	text-align:center;
	font-size:20px;
	text-decoration:none;
	color:blue;
}

#css a:hover {
	display:inline-block;
	text-align:center;
	font-size:20px;
	background-color:yellow;
	width:400px;
	height:100px;
	text-decoration:none;
	border: 1px solid red;
	-moz-border-radius:20px;
}

</style>
</head>

<body>
<div id="css"><a href="#">test</a></div>

</body>
</html>

Received on Wednesday, 26 January 2011 12:49:51 UTC