How can I vertically align items in an unordered list to work in IE6 and 7?
I can't just set line-height to the full height because I have both 1 row items and 2 row items.
My code is:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<style type="text/css">
ul {
list-style: none;
border: 1px solid black;
height: 40px;
}
li {
float: left;
margin-right: 10px;
height: 40px;
width: 46px;
}
a {
}
</style>
</head>
<body>
<ul>
<li>
<a href="/">item1</a>
</li>
<li>
<a href="/">two lines</a>
</li>
</ul>
</body>
</html>