W3C home > Mailing lists > Public > www-style@w3.org > January 2011

Re: width and height

From: Bruno <bruno5544@gmail.com>
Date: Wed, 26 Jan 2011 13:48:58 +0100
Message-ID: <AANLkTimjYP3OW9YpMF+d=ApMa12qFOoh2z+QDmuCok+K@mail.gmail.com>
To: Alan Gresley <alan@css-class.com>
Cc: www-style@w3.org
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:36 GMT