Return to Snippet

Revision: 12869
at March 30, 2009 22:53 by hotdiggity


Initial Code
<!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>
		<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
		<title>Untitled Document</title>
		<style>

#links{
	border: 1px solid #eee;
	height: 50px;
	line-height: 50px;
}

#links ul
{
	margin: 0px;
	padding: 0px;
	float: left;
	list-style-type: none;
}

#links ul li {
	margin-right: 20px;
	padding: 0px;
	display: inline;
}
		</style>
	</head>
	<body>
		<div id="links">
			<ul>
				<li><a href="#">Link 1 </a></li>
				<li><a href="#">Link 2 </a></li>
				<li><a href="#">Link 3 </a></li>
			</ul>
		</div>
	</body>
</html>

Initial URL

                                

Initial Description
To centre, make "line-height" the same as the div height.

Initial Title
vertically centre a horizontal list within a div

Initial Tags
css, html

Initial Language
CSS