Horizontal navigation bar not working in IE and firefox

nalyque

New Member
I am creating a navigation menu with HTML and CSS. But it is not working properly in Firefox 19. I tried to fix it for hours. But no luck. My problem is when hover on submenu display a border around menu item. It is working properly on google chrome and safari. But not in firefox and IE 7 and 8. This is my CSS : \[code\].navigation { height: 48px; width: 100%; float: left;}#nav { margin: 7px 0; line-height: 100%; float: left;}#nav li { float: left; position: relative; list-style: none;}#nav a { color: #c5c5c5; text-decoration: none; display: block; padding: 9px 12px; margin: 0 1px 0 0; -webkit-border-radius: .4em; -moz-border-radius: .4em; border-radius: .4em; text-shadow: 0 1px rgba(29, 29, 29, 0.2);}#nav a:hover { background: #000; color: #c5c5c5; }#nav .current a, #nav li:hover > a { background: -moz-linear-gradient(#D0441B, #BB3415); background: -webkit-linear-gradient(#D0441B, #BB3415); /* Safari 5.1+, Chrome 10+ */ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#D0441B', endColorstr='#BB3415'); /* IE6 & IE7 */ -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#D0441B', endColorstr='#BB3415')"; /* IE8+ */ border-color: #B5501A; box-shadow: 0 1px 0 0 #C97B4B inset; color: #FFFFFF; }#nav li:hover ul li.current-sub { background: #ffdfbd;} #nav li:hover ul li.current-sub a { color: #5f3100;} #nav li:hover ul li.current-sub:hover { background: #ffcd98; border: none !important;} /* sub levels link hover */#nav ul li:hover a, #nav li:hover li a { background: none; border: none !important; color: #666; -webkit-box-shadow: none; -moz-box-shadow: none; text-shadow: none;}#nav ul li:hover { background: #ffefdd;}#nav ul li a:hover { -webkit-border-radius: 0; -moz-border-radius: 0; border-radius: 0; border: none;}/* dropdown */#nav li:hover > ul { display: block; z-index: 999;}/* level 2 list */#nav ul { display: none; margin: 0; padding: 0; width: 185px; position: absolute; top: 31px; left: 0; background: #fafafa; border: solid 1px #c7c7c7; -webkit-border-radius: .5em; -moz-border-radius: .5em; border-radius: .5em; -webkit-box-shadow: 0 1px 2px rgba(0,0,0, .4); -moz-box-shadow: 0 1px 2px rgba(0,0,0, .4); box-shadow: 0 1px 2px rgba(0,0,0, .4);}#nav ul li { float: none; margin: 0; padding: 0;}/* level 3+ list */#nav ul ul { left: 181px; top: -3px;}/* rounded corners of first and last link */#nav ul li:first-child > a { -webkit-border-top-left-radius: .4em; -moz-border-radius-topleft: .4em; border-top-left-radius: .4em; -webkit-border-top-right-radius: .4em; -moz-border-radius-topright: .4em; border-top-right-radius: .4em;} #nav ul li:first-child.current-sub,#nav ul li:first-child:hover { -webkit-border-top-left-radius: .4em; -moz-border-radius-topleft: .4em; border-top-left-radius: .4em; -webkit-border-top-right-radius: .4em; -moz-border-radius-topright: .4em; border-top-right-radius: .4em;}#nav ul li:last-child > a { -webkit-border-bottom-left-radius: .5em; -moz-border-radius-bottomleft: .5em; border-bottom-left-radius: .5em; -webkit-border-bottom-right-radius: .5em; -moz-border-radius-bottomright: .5em; border-bottom-right-radius: .5em;} #nav ul li:last-child.current-sub, #nav ul li:last-child:hover { -webkit-border-bottom-left-radius: .5em; -moz-border-radius-bottomleft: .5em; border-bottom-left-radius: .5em; -webkit-border-bottom-right-radius: .5em; -moz-border-radius-bottomright: .5em; border-bottom-left-radius: .5em;}/* clearfix */#nav:after { content: "."; display: block; clear: both; visibility: hidden; line-height: 0; height: 0;}#nav { display: inline-block;} html[xmlns] #nav { display: block;}* html #nav { height: 1%;}\[/code\]This is a link to jsfiddle
 
Back
Top