Posted by John on 10/24/06 10:21
Hi
I have a dropdown menu. Standard HTML with ul and li.
The following code works except that the boxes are all left justified and I
would like them to be centred.
I've tried auto with margins and various permutations but cannot get the
boxes to center.
Any ideas.
div#navbar {width:100%; margin-left:auto; margin-right:auto;}
div#navbar ul {list-style:none; padding:0; margin:0;}
div#navbar li {float:left; margin:0em;}
div#navbar li a{background: url(background.gif) #fff bottom left repeat-x;
height:20px; line-height:20px; float:left; width:7em; display:block;
border: 0.1em solid #DCDCE9;
color:white; font-size:x-small; text-decoration:none;
text-align:center;font-family: Verdana, sans-serif;}
div#navbar li a {float:none} /* IE5-MAC*/
div#navbar li a:hover {font-weight:bold; color:#5101BC; background:white;}
Excuse the sloppy coding.
Regards
John
[Back to original message]
|