WordPress.org

Ready to get started?Download WordPress

Forums

Help please....menu dropdown position??? (5 posts)

  1. The Painted Hive
    Member
    Posted 2 years ago #

    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.....
    :-)

  2. mukesh panchal
    Member
    Posted 2 years ago #

    can u give live url

  3. The Painted Hive
    Member
    Posted 2 years ago #

    Sorry, the site is only hosted locally for now. I know this makes things difficult.

  4. mukesh panchal
    Member
    Posted 2 years ago #

    then how i check what u have problem
    u live this site

  5. The Painted Hive
    Member
    Posted 1 year ago #

    Ended up using some padding. It's not perfect in IE though will do.

Topic Closed

This topic has been closed to new replies.

About this Topic