<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html >
<body>
<div id="container">
<div id="menu">
<ul>
<li><a >page1</a></li>
<li><a >page2</a></li>
<li><a >page3</a></li>
</ul>
</div>
</div>
</body>
</html>
Here is the CSS code:
<style>
#menu {
margin: 0 10px 10px 10px;
overflow: hidden;
font-size: 13px;
font-weight: bold;
}
#menu ul {
margin: 0;
padding: 0;
}
#menu ul li {
margin: 0 2px;
display: inline;
vertical-align: middle;
text-align: center;
}
#container {
width: 785px;
margin: 0 auto;
background-color: #fff;
padding-top: 6px;
padding-bottom: 10px;
}
</style>
In order to center the menu on the page, you can try the following:
If you are facing alignment issues in Internet Explorer (IE) after removing the DTD validator, you can try adjusting the CSS properties to achieve the desired result. You can try using alternative styling techniques to center the menu without relying on the DTD validator.