I can't get this navigation menu to center in the Menu Layer? I've posted the html and css. Any help is appreciated. Thanks.
HTML: Can I post this here?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"<html>
<head>
<title>Untitled Document</title>
<link rel="stylesheet" href="Menu_Help.css" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<script type="text/javascript">
startList = function() {
if (document.all && document.getElementById) {
navRoot = document.getElementById("dmenu");
for (i=0; i < navRoot.childNodes.length; i++) {
node = navRoot.childNodes;
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
}
node.onmouseout=function() {
this.className=this.className.replace(" over", "");
}
}
}
}
}
window.onload=startList;
//-->
</script>
<body>
<div id="Menu">
<ul class="topmenu" id="dmenu">
<li class="topmenuli"><a href="" class="topmenutitle">Home</a></li>
<li class="topmenuli"><a href="" class="topmenutitle">About</a></li>
<li class="topmenuli"><a href="" class="topmenutitle">Stuff 1</a></li>
<li class="topmenuli"><a href="" class="topmenutitle">Stuff 2</a></li>
<li class="topmenuli"><a href="" class="topmenutitle">Other</a>
<ul class="submenuul">
<li class="submenuli"><a href="">Company Photos ...</a></li>
<li class="submenuli"><a href="">Company Forms ...</a></li>
<li class="submenuli"><a href="">Company News ...</a></li>
<li class="submenuli"><a href="">More News ...</a></li>
</ul>
</li>
</ul>
</div>
</body>
CSS Code:
body, html
{
font-family: Arial;
border: 0;
margin: 0;
text-align: center;
background-color: #FFFFCC;
}
Div
{
-moz-box-sizing:border-box;
box-sizing:border-box;
margin:0;
padding:0;
}
#Menu
{
background: #000000;
width: 800px;
height: 25px;
}
html>body #Wrapper {overflow:auto;}
#Main
{
display:table;
width: 794px;
}
/* CSS Popup */
.topmenuul{
list-style-type:none;
top: 100px;
margin:0;
padding:0;
}
.topmenuli{
list-style-type:none;
float:left;
}
.topmenutitle{
display: block;
font-weight: bold;
font-size: 10px;
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #FFFF66;
padding: 4px 8px;
border-top: 1px solid white;
border-right: 1px solid black;
border-bottom: 1px solid black;
border-left: 1px solid white;
text-align: center;
min-width: 100px;
text-transform: uppercase;
}
.submenuul{
list-style-type:none;
position:absolute;
margin: 0;
padding:0;
display:none;
}
.submenuli a{
display:block;
width:250px;
}
li:hover ul , li.over ul{ /* lists nested under hovered list items */
display: block;
}
#dmenu li>ul {
top: 100;
left: auto;
}
/*make it pretty*/
#dmenu {
font-family: Arial, Helvetica, Sans-Serif;
font-size:12px;
}
.topmenuul {
}
.topmenutitle {
text-indent:3px;
text-decoration: none;
background-color: #0000FF;
padding:3px;
line-height:14px;
}
.submenuul {
margin-top:-1px;
background-color: #990000;
background-position: top left;
background-repeat: repeat-x;
}
.submenuli a{
bottom: 5px;
padding:3px;
text-decoration: none;
color: #FFFF66;
}
.submenuli a:hover{
text-decoration: none;
background:#336699;
color: #FFFFFF;
}
</html>
HTML: Can I post this here?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"<html>
<head>
<title>Untitled Document</title>
<link rel="stylesheet" href="Menu_Help.css" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<script type="text/javascript">
startList = function() {
if (document.all && document.getElementById) {
navRoot = document.getElementById("dmenu");
for (i=0; i < navRoot.childNodes.length; i++) {
node = navRoot.childNodes;
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
}
node.onmouseout=function() {
this.className=this.className.replace(" over", "");
}
}
}
}
}
window.onload=startList;
//-->
</script>
<body>
<div id="Menu">
<ul class="topmenu" id="dmenu">
<li class="topmenuli"><a href="" class="topmenutitle">Home</a></li>
<li class="topmenuli"><a href="" class="topmenutitle">About</a></li>
<li class="topmenuli"><a href="" class="topmenutitle">Stuff 1</a></li>
<li class="topmenuli"><a href="" class="topmenutitle">Stuff 2</a></li>
<li class="topmenuli"><a href="" class="topmenutitle">Other</a>
<ul class="submenuul">
<li class="submenuli"><a href="">Company Photos ...</a></li>
<li class="submenuli"><a href="">Company Forms ...</a></li>
<li class="submenuli"><a href="">Company News ...</a></li>
<li class="submenuli"><a href="">More News ...</a></li>
</ul>
</li>
</ul>
</div>
</body>
CSS Code:
body, html
{
font-family: Arial;
border: 0;
margin: 0;
text-align: center;
background-color: #FFFFCC;
}
Div
{
-moz-box-sizing:border-box;
box-sizing:border-box;
margin:0;
padding:0;
}
#Menu
{
background: #000000;
width: 800px;
height: 25px;
}
html>body #Wrapper {overflow:auto;}
#Main
{
display:table;
width: 794px;
}
/* CSS Popup */
.topmenuul{
list-style-type:none;
top: 100px;
margin:0;
padding:0;
}
.topmenuli{
list-style-type:none;
float:left;
}
.topmenutitle{
display: block;
font-weight: bold;
font-size: 10px;
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #FFFF66;
padding: 4px 8px;
border-top: 1px solid white;
border-right: 1px solid black;
border-bottom: 1px solid black;
border-left: 1px solid white;
text-align: center;
min-width: 100px;
text-transform: uppercase;
}
.submenuul{
list-style-type:none;
position:absolute;
margin: 0;
padding:0;
display:none;
}
.submenuli a{
display:block;
width:250px;
}
li:hover ul , li.over ul{ /* lists nested under hovered list items */
display: block;
}
#dmenu li>ul {
top: 100;
left: auto;
}
/*make it pretty*/
#dmenu {
font-family: Arial, Helvetica, Sans-Serif;
font-size:12px;
}
.topmenuul {
}
.topmenutitle {
text-indent:3px;
text-decoration: none;
background-color: #0000FF;
padding:3px;
line-height:14px;
}
.submenuul {
margin-top:-1px;
background-color: #990000;
background-position: top left;
background-repeat: repeat-x;
}
.submenuli a{
bottom: 5px;
padding:3px;
text-decoration: none;
color: #FFFF66;
}
.submenuli a:hover{
text-decoration: none;
background:#336699;
color: #FFFFFF;
}
</html>