...

View Full Version : Navbar positioning & submenu disappearing



johndove
11-30-2012, 08:44 PM
Hi,

Please see URL: testing.backstageweb.net. Got two problems here:

1. I want to center the navbar (links) both horizontally and vertically, don't know how without moving the nav_bkgrnd too. Perhaps I don't have the nav_bkgrnd on the right property)

2. The "Home" menu has a sub-menu item. When you try mousing over it, it mostly disappears.

Working with an adopted stylesheet that I don't quite get. Thank you in advance for any help. ~ John

Code:


#nav {
position:relative;
line-height:1.0;
zoom:1;
z-index:99;
font-size:1.1em;
font-weight:bold;
}

#nav li {
position:relative;
float: left;
}

.menu#nav-primary {
background:url(../images/nav_bkgrnd.jpg)no-repeat;
/*overflow:hidden;*/
width:1000px;
height:145px;
margin:0;
}

#nav-primary li {
margin-right: 10px;
}

#nav-primary a, #nav-primary a:visited {
background-color:transparent;
padding:7px 16px;
color:#fff;
display:block;
}

#nav-primary a:hover, #nav-primary a:active {
background-color:transparent;
color:yellow;
outline:0;
}

aaronhockey_09
12-01-2012, 12:10 AM
1. Add this to the UL

float:left; width:100%; text-align:center
and add this to the LI

display:inline-block --- and remove the float:left - from the LI as well.

2. This should be fixed as well with #1.

johndove
12-01-2012, 10:22 PM
Thanks aaron, got the first part solved, but adding display:inline-block didn't fix the sub-menu from disappearing. Can't remove float:left, else the menu goes vertical.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum