I have #menu and I would like the ul inside of it to be centered. I have tried usind the following
margin:0 auto; and text-align:center; on #menu thinking that this would center everything inside it
but it did not.
What do I do.
Howard
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"><title></title>
<stylE>
body {background: url(images/background.gif) no-repeat;font-size: .75em; font-family: arial;margin:0;padding:0;text-
align:center;}
body,h1,h2,h3,h4,ul,li {margin:0;padding:0;}
#container {width: 900px; margin:0 auto;text-align:left; }
#header {height: 200px;}
#menu {height: 75px; border: 1px solid black;}
#menu ul {list-style: none; width: 568px; height: 75px; }
#menu li {float: left; background-color: white; text-align: center; border: 1px solid gray; margin-right: 5px; text-
decoration: none; color: black;padding: 25px;text-transform: uppercase;}
#sidebar {float: left; padding-left: 10px; padding-bottom: 20px;}
#sidebar ul {list-style: none;text-decoration: none; }
#sidebar li a:link,a:visited { text-transform: uppercase; text-decoration: none; font-size: 10px;}
#sidebar li a:hover {color: black; text-decoration:underline;}
#content {clear:both;background-color: WHITE; width: 100%;height: 300px;}
</style></head><body><div id="container">
<div id="header"><h1><span>Logo</span></h1>
<div id="menu"><ul><li>1</li><li>2</li><li>3</li></ul></div>
</div> <!-- end of header -->
<div id="content">
<div id="sidebar">
<ul>
<li><a href="#">HOME</a></li>
<li><a href="#">TEST1</a></li>
<li><a href="#">TEST1</a></li>
<li><a href="#">TEST1</a></li>
<li><a href="#">TEST1</a></li>
<li><a href="#">CONTACT US</a></li>
</ul>
</div> <!-- end of sidebar -->
<div id="col1">information</div> <!-- end of col1 -->
</div> <!-- end of content -->
<div id="footer">footer </div> <!-- end of footer -->
</div> <!-- end of container -->
</body></html>
margin:0 auto; and text-align:center; on #menu thinking that this would center everything inside it
but it did not.
What do I do.
Howard
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"><title></title>
<stylE>
body {background: url(images/background.gif) no-repeat;font-size: .75em; font-family: arial;margin:0;padding:0;text-
align:center;}
body,h1,h2,h3,h4,ul,li {margin:0;padding:0;}
#container {width: 900px; margin:0 auto;text-align:left; }
#header {height: 200px;}
#menu {height: 75px; border: 1px solid black;}
#menu ul {list-style: none; width: 568px; height: 75px; }
#menu li {float: left; background-color: white; text-align: center; border: 1px solid gray; margin-right: 5px; text-
decoration: none; color: black;padding: 25px;text-transform: uppercase;}
#sidebar {float: left; padding-left: 10px; padding-bottom: 20px;}
#sidebar ul {list-style: none;text-decoration: none; }
#sidebar li a:link,a:visited { text-transform: uppercase; text-decoration: none; font-size: 10px;}
#sidebar li a:hover {color: black; text-decoration:underline;}
#content {clear:both;background-color: WHITE; width: 100%;height: 300px;}
</style></head><body><div id="container">
<div id="header"><h1><span>Logo</span></h1>
<div id="menu"><ul><li>1</li><li>2</li><li>3</li></ul></div>
</div> <!-- end of header -->
<div id="content">
<div id="sidebar">
<ul>
<li><a href="#">HOME</a></li>
<li><a href="#">TEST1</a></li>
<li><a href="#">TEST1</a></li>
<li><a href="#">TEST1</a></li>
<li><a href="#">TEST1</a></li>
<li><a href="#">CONTACT US</a></li>
</ul>
</div> <!-- end of sidebar -->
<div id="col1">information</div> <!-- end of col1 -->
</div> <!-- end of content -->
<div id="footer">footer </div> <!-- end of footer -->
</div> <!-- end of container -->
</body></html>