• So, I have finally worked out how to center my navigation menu horizontally in a cross-browser compatible way. The problem I now have though is with my dropdowns. They have inherited some of the attributes I used to center the nav and now, when the menu parent page is hovered over, the dropdown pops up over it, rather than under and to the side a bit. I’ve tried a few fixes though am not sure the best way to go about resolving the issue in the most browser friendly way. Do I need a different position attribute or alignment or something? I can’t get margin or padding to work.
    Here’s the code:

    #nav {
    	-khtml-border-radius: 0px;
    	-moz-border-radius: 0px;
    	-webkit-border-radius: 0px;
    	background-image:url(/wp-content/themes/child/images/banner.png);
    	border-radius: 0px;
    	clear: both;
    	color: #555;
    	margin: 0 auto 0px;
    	overflow: hidden;
    	text-align: center;
    	text-transform: uppercase;
    	height: 35px;
    	width: 920px;
    }
    
    #nav ul {
    	width: 100%;
    	margin: 0 auto;
    	display: inline-block;
    	list-style: none;
    }
    
    #nav li {
    	display: inline-block;
    	list-style: none;
    }
    
    #nav li a {
    	color: #90877C;
    	display: block;
    	font-size: 12px;
    	float: left;
    	margin: 0px 0px 0px 0px;
    	padding: 8px 15px 0px 15px;
    	text-decoration: none;
    }
    
    #nav li a:hover,
    #nav li a:active,
    #nav li:hover a,
    #nav .current_page_item a,
    #nav .current-cat a,
    #nav .current-menu-item a {
    	color: #90877C;
    }
    
    #nav li a:hover {
    	color: #222;
    }
    
    #nav li li a,
    #nav li li a:link,
    #nav li li a:visited {
    	background: #fbf7eb;
    	border-top-width: 0px;
    	color: #555;
    	padding: 10px;
    	font-size: 11px;
    	position: relative;
    	margin: 0px 0px 0px 5px;
    	text-transform: none;
    	text-align: left;
    	width: 100px;
    }
    
    #nav li li a:hover,
    #nav li li a:active {
    	color: #222;
    }
    
    #nav li ul {
    	height: auto;
    	left: -9999px;
    	margin: 0 0 0 -1px;
    	position: absolute;
    	width: 150px;
    	z-index: 9999;
    }
    
    #nav li ul a {
    	width: 130px;
    }
    
    #nav li ul ul {
    	margin: -33px 0 0 122px;
    }
    
    #nav li:hover>ul,
    #nav li.sfHover ul {
    	left: auto;
    }

    Help please…..
    ??

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Help please….menu dropdown position???’ is closed to new replies.