Navigation Bar is backwards on large media not Mobile phones - html

I trying to to make a responsive navigation menu (logo LEFT and nav RIGHT, at one point the it was working fine on the large media types but failed on the mobile media (order of nav back to front) I have tried aligning the UL float right and Li float left but no joy, I'm sure I,m just over looking something simple.
HTML
<div id="Header"><!--Start of Header-->
<div><img id="Logo"src="images/logo.png"></div>
<nav><!--start of nav tag-->
<span class="nav-btn"></span>
<ul class="nav">
<li>Home</li>
<li>About Us
<ul>
<li><a href="#Beliefs" >Beliefs</a></li>
<li>Pastors</li>
</ul>
</li>
<li>Services</li>
<li>Ministries
<ul>
<li>Evangelism</li>
<li>LifeGroups</li>
<li>Prayer</li>
<li>Youth</li>
<li>Childrens</li>
<li>Extra</li>
</ul>
</li>
<li>Media
<ul>
<li>Sermons</li>
<li>Gallery</li>
<li>Newsletter</li>
<li>Videos</li>
</ul>
</li>
<li>Contact Us</li>
</ul><!--End of nav class ul tag-->
</nav><!--End of nav tag-->
</div><!--End of Header-->
CSS
/*Start of Navigation Bar*/
/*Navigation ul*/
.nav {
width:100%;
background:black;
line-height:100px;
position:fixed;
border-bottom: 1px red solid;
}
/*Navigation li*/
nav .nav li{
list-style-type: none;
float: left;
position:relative;
}
/*Dropdown Clear funtion*/
#NavBar ul:after{content:"";display:block;clear:both}
/*Navigation a*/
nav .nav li a{
color:white;
text-decoration: none;
padding:20px;
}
/*Navigation a HOVER*/
nav .nav li a:hover{
color:yellow;
text-decoration: none;
padding:px;
background:blue;
transition:all 0.8s;
}
/*Navigation li HOVER*/
nav .nav li:hover{
width:auto;
background:black;
transition:all 0s;
}
/*Mobile Menu HIDDEN submenu*/
/*hide submenu*/
nav .nav li ul {
width:auto;
display: none;
border-right:2px red solid;
border-left:2px red solid;
}
/*Mobile menu button Display:NONE*/
.nav-btn{display:none;}
/*Show submenu at hover*/
nav .nav li:hover ul {
width:auto;
display:block;
position:absolute;
top:100px;
background-color:black;
border-bottom:2px red solid;
}
/*Make submenu vertical*/
nav .nav li ul li{
width:100%;
display: block;
float:none;
line-height:60px;
position: relative;
z-index: 10;
}
/*Navigation sub li*/
nav .nav li ul li:hover{
width:auto;
color:red;
text-decoration: none;
background:blue;
}
/*Navigation a*/
nav .nav li ul li a:hover{
width:auto;
color:yellow;
text-decoration: none;
background-color:blue;
}
/*MOBILE PHONE*/
#media (max-width: 660px){
/*Navigation a HOVER 1st level - MOBILE PHONE*/
nav .nav li a:hover{
color:yellow;
background:black;
transition:all 0.0s;
}
/*Navigation a HOVER sub menu - MOBILE PHONE*/
nav .nav li ul li a:hover{
width:auto;
color:yellow;
text-decoration: none;
background-color:transparent;
}
/*Navigation ul size of ul main menu MOBILE PHONE*/
.nav {
width:60%;
height:auto;
background:black;
line-height:50px;
position:fixed;
border-radius:0 0 20px 0;
}
/*Navigation li size of li in - MOBILE PHONE*/
nav .nav li{
width:100%;
display:block;
float: none;
background-color:navy;
border-bottom:1px red solid;
}
/*Navigation li size of li in - MOBILE PHONE*/
nav .nav li:last-child{
border-radius:0 0 20px 0;
border-bottom:1px yellow solid;
}
/*sub menu background color - MOBILE PHONE*/
nav .nav li ul li{
width:100%;
height:100%;
left:30px;
line-height:30px;
background-color:orange;
}
/*2nd level UL - MOBILE PHONE*/
nav .nav li ul{
border-right:0px red solid;
border-left:0px red solid;
}
/*2nd level UL HOVER - MOBILE PHONE*/
nav .nav li:hover ul {
width:50%;
padding:0px;
margin:0px;
left:75px;
top:10px;
background-color:transparent;
}
/*1st level UL- MOBILE PHONE*/
.nav{
text-align:left;
display:none;
}
/*1st level LI- MOBILE PHONE*/
.nav > li{
display:block;
}
/*Menu BUTTON settings- MOBILE PHONE*/
.nav-btn{
width:100%;
height:70px;
display:block;
background-color:navy;
color:#FFF;
font-size:30px;
padding-left:10px;
padding-top:10px;
text-align:left;
cursor:pointer;
}
/*Menu BUTTON- MOBILE PHONE*/
.nav-btn:before{
content: "Menu";
}
}

You could do:
nav .nav {
float: left;
}
nav .nav li {
display:inline-block;
}
That would float the .nav div left instead, and the LI's will be next to eachother

Related

error menu drodown css html <nav> <ul>

I am creating a page where there is a menu that contains a submenu centered at the top of the page, my problem is being to centralize the submenu with the main menu, because it always goes out of alignment, does anyone know what it can be? Thank you in advance for any help!
"ps:in the image contains the visible error"
edit1:run and with the link and with the html that was missing.
link:https://testtestteste111111.000webhostapp.com/
.menu{
width:100%;
height:49px;
background-color:#494545;
font-family:'Arial';
position: -webkit-sticky; /* Safari */
position: sticky;
top: 0;
z-index:9999;
}
.menu ul{
list-style:none;
position:relative;
margin-left:24%;
}
.menu ul li{
width:150px;
float:left;
}
.menu a{
padding:15px;
display:block;
text-decoration:none;
text-align:center;
background-color:#494545;
color:#fff;
}
.menu ul ul{
position:absolute;
visibility:hidden;
}
.menu ul li:hover > ul{
visibility:visible;
/* border:1px solid #901E93; sub div*/
}
.menu a:hover{
background-color:#7F818D;
color:#fff;
}
.menu ul ul li{
float:none;
border-bottom:solid 1px #ccc;
margin-left:-164%;
}
.menu ul ul li a{
background-color:#646464;
}
label[for ="bt_menu"]{
padding:5px;
background-color:#494545;
color:#fff;
font-family:"Arial";
text-aling:center;
font-size:30px;
cursor:pointer;
width:100%;
max-height:58px;
z-index:9999;
margin-top:-10px;
top:-5px;
display:none;
position:fixed;
}
.imgbar{
max-height:25px;
max-width:25px;
margin-top:10px;
}
#bt_menu{
display:none;
}
#media(max-width:800px){
label[for="bt_menu"]{
display:block;
color:#fff;
z-index:9999;
position:fixed;
margin-top:1px;
}
.menu{
margin-top:-1px;
margin-left:-100%;
transition:all .4s}
#bt_menu:checked ~ .menu{
margin-left:0;}
.menu ul li{
width:100%;
float:none;}
.menu ul ul{
position:static;
overflow:hidden;
max-height:0;
transition:all .4s;
}
.menu ul li:hover ul{
height:auto;
max-height:200px;
}
.menu ul{
list-style:none;
position:relative;
margin-left:0;
z-index:9999;
}
.menu ul ul li{
float:none;
border-bottom:solid 1px #ccc;
margin-left:0;
}
.parallax {
width:100%;
/* The image used */
background-image: url(../img/img1.jpg);
/* Set a specific height */
height: 800px;
/* Create the parallax scrolling effect */
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
margin-top:-50px;
}
#ultopo{
margin-top:49px;
}}
html
<input type="checkbox" id="bt_menu">
<label for="bt_menu"><img class="imgbar" src="img/bars.svg"></img></label>
<nav class="menu">
<ul id="ultopo">
<li>Home</li>
<li>Serviços
<!-- nested UL in LI -->
<ul>
<li>ex:A</li>
<li>ex:b</li>
</ul>
</li>
<li>Atuaçao
<!-- nested UL in LI -->
<ul>
<li>ex:A</li>
<li>ex:B</li>
<li>ex:C</li>
</ul>
</li>
<li>contato</li>
</ul>
</nav>
Please update css
Here is link https://jsfiddle.net/jbv09vy4/1/
Add css
.menu ul li {
position: relative;
}
.menu ul ul {
left: 0;
margin: 0;
}
and remove styles margin-left: -164% from
.menu ul ul li {
float: none;
border-bottom: solid 1px #ccc;
margin-left: -164%;
}

Creating a dropdown menu in an existing navigation bar

I'm currently working on my website and I have an existing navigation bar. The problem is that I have too much information to share on one page. That's why I'd like to implement a dropdown menu in the existing navigation bar. I've tried many many things but it all seems to screw up my lay-out of the css or it completely deletes the navigation bar.
I got an exisiting code for a dropdown menu but I simply am not able to blend it with the existing css code. I got this code from the internet, it is not my property.
My HTML:
<div id="menu">
<ul>
<li class="current_page_item">Home</li>
<li>Onze service</li>
<li>Ons team</li>
<li>Prijzen</li>
<li>Contact</li>
</ul>
</div>
My CSS:
#menu
{
position: absolute;
right: 0;
top: 1em;
}
#menu ul
{
display: inline-block;
}
#menu li
{
display: block;
float: left;
text-align: center;
line-height: 60px;
}
#menu li a, #menu li span
{
display: inline-block;
margin-left: 1px;
padding: 0em 1.5em;
letter-spacing: 0.10em;
text-decoration: none;
font-size: 1.0em;
text-transform: uppercase;
outline: 0;
color: #212121;
background: #ECECEC;
}
#menu li:hover a, #menu li.active a, #menu li.active span
{
}
#menu .current_page_item a
{
background: #E24E2A;
color: #FFF;
}
#menu .icon
{
}
Drop down menu:
#primary_nav_wrap
{
margin-top:15px
}
#primary_nav_wrap ul
{
list-style:none;
position:relative;
float:left;
margin:0;
padding:0
}
#primary_nav_wrap ul a
{
display:block;
color:#333;
text-decoration:none;
font-weight:700;
font-size:12px;
line-height:32px;
padding:0 15px;
font-family:"HelveticaNeue","Helvetica Neue",Helvetica,Arial,sans-serif
}
#primary_nav_wrap ul li
{
position:relative;
float:left;
margin:0;
padding:0
}
#primary_nav_wrap ul li.current-menu-item
{
background:#ddd
}
#primary_nav_wrap ul li:hover
{
background:#f6f6f6
}
#primary_nav_wrap ul ul
{
display:none;
position:absolute;
top:100%;
left:0;
background:#fff;
padding:0
}
#primary_nav_wrap ul ul li
{
float:none;
width:200px
}
#primary_nav_wrap ul ul a
{
line-height:120%;
padding:10px 15px
}
#primary_nav_wrap ul ul ul
{
top:0;
left:100%
}
#primary_nav_wrap ul li:hover > ul
{
display:block
}
Thanks in advance!
Your navigation wrapper is menu whereas in the CSS from online it is primary_nav_wrap, so swap instances of these to menu.
In the html itself nested unordered list elements is used for the drop-downs, so add these under the list element where you need a drop-down.
Html:
<div id="menu">
<ul>
<li class="current_page_item">Home<ul>
<li>sub1</li>
<li>sub2</li>
<li>sub3</li>
</ul>
<li>Onze service</li>
<li>Ons team</li>
<li>Prijzen</li>
<li>Contact</li>
</ul>
</div>
CSS:
#menu ul {
display:inline-block;
list-style:none;
position:relative;
float:left;
margin:0;
padding:0
}
#menu li {
display:block;
float:left;
text-align:center;
line-height:60px
}
#menu li a,#menu li span {
display:inline-block;
margin-left:1px;
padding:0 1.5em;
letter-spacing:.1em;
text-decoration:none;
font-size:1em;
text-transform:uppercase;
outline:0;
color:#212121;
background:#ECECEC
}
#menu .current_page_item a {
background:#E24E2A;
color:#FFF
}
#menu {
margin-top:15px
}
#menu ul a {
display:block;
color:#333;
text-decoration:none;
font-weight:700;
font-size:12px;
line-height:32px;
padding:0 15px;
font-family:"HelveticaNeue","Helvetica Neue",Helvetica,Arial,sans-serif
}
#menu ul li {
position:relative;
float:left;
margin:0;
padding:0
}
#menu ul li.current-menu-item {
background:#ddd
}
#menu ul li:hover {
background:#f6f6f6
}
#menu ul ul {
display:none;
position:absolute;
top:100%;
left:0;
background:#fff;
padding:0
}
#menu ul ul li {
float:none;
width:200px
}
#menu ul ul a {
line-height:120%;
padding:10px 15px
}
#menu ul ul ul {
top:0;
left:100%
}
#menu ul li:hover > ul {
display:block
}
Here is a jsfiddle of the code merged:
https://jsfiddle.net/o51pp5s6/

li id colour issue on dropdown menu

I'm coding a website for uni right now and it's going pretty well, with the exception of a dropdown menu issue. I've given the li property an ID of "selected" on some menu options (when the user is on the page in question), so that it changes colour to a dark pink.
However, the dropdown options underneath whatever has the li id of "selected" all turn dark pink too. When I add a closed li tag at the end of "about" in the html, the dropdown doesn't appear at all.
I'll post the relevant html and CSS as well as screenshots, hopefully someone could help me, please!
THIS is how a dropdown menu (without the id of "selected") looks normally. the links work and it goes slightly darker when i hover over, which is what i want
whereas THIS has the "selected" id. i don't want the dropdown menu this colour - JUST the "about" box
Here's all of the dropdown code:
/*----- Menu Outline -----*/
.menu-wrap {
width:100%;
box-shadow:0px 1px 3px rgba(0,0,0,0.2);
background:#ffeff8;
}
.menu {
width:1000px;
margin:0px auto;
}
.menu li {
margin:0px;
list-style:none;
font-family:"Luna";
text-transform: lowercase;
border:1px solid #ed85c4;
}
.menu a {
transition:all linear 0.15s;
color:#ed85c4;
background:#ffeff8;
}
.menu li:hover > a, .menu .current-item > a {
text-decoration:none;
color:#d771ae;
}
.menu .arrow {
font-size:10px;
line-height:0%;
}
/*----- Top Level -----*/
.menu > ul > li {
float:left;
display:inline-block;
position:relative;
font-size:14px;
}
.menu > ul > li > a {
padding:3px 40px;
display:inline-block;
text-shadow:0px 0px 0px rgba(0,0,0,0.4);
}
.menu > ul > li:hover > a, .menu > ul > a {
background:#f1dae8;
}
.menu > ul > li#selected a{
color: #ffeff8;
background: #c864a1;
}
/*----- Bottom Level -----*/
.menu li:hover .sub-menu {
z-index:1;
opacity:1;
}
.sub-menu {
width:100%;
padding:0px 0px;
position:absolute;
top:100%;
left:0px;
z-index:-1;
opacity:0;
transition:opacity linear 0.15s;
box-shadow:0px 0px 0px rgba(0,0,0,0.2);
}
.sub-menu li {
display:block;
font-size:12px;
text-transform: lowercase;
font-kerning: auto;
}
.sub-menu li a {
padding:10px 30px;
display:block;
background: #ffeff8;
}
.sub-menu li a:hover, .sub-menu a {
background: #f1dae8;
}
<div class="menu-wrap">
<nav class="menu">
<ul class="clearfix">
<li id="selected">
about <span class="arrow">▼</span>
<ul class="sub-menu">
<li>history</li>
<li>values</li>
<li>the truck</li>
<li>produce info.</li>
</ul>
</li>
You did not select correctly the link below the #selected list item.
.menu > ul > li#selected a /*This selects all links below the selected li, including links in child list items*/
should be
.menu > ul > li#selected > a /* this selects the immediate descendent link only */
/*----- Menu Outline -----*/
.menu-wrap {
width:100%;
box-shadow:0px 1px 3px rgba(0,0,0,0.2);
background:#ffeff8;
}
.menu {
width:1000px;
margin:0px auto;
}
.menu li {
margin:0px;
list-style:none;
font-family:"Luna";
text-transform: lowercase;
border:1px solid #ed85c4;
}
.menu a {
transition:all linear 0.15s;
color:#ed85c4;
background:#ffeff8;
}
.menu li:hover > a, .menu .current-item > a {
text-decoration:none;
color:#d771ae;
}
.menu .arrow {
font-size:10px;
line-height:0%;
}
/*----- Top Level -----*/
.menu > ul > li {
float:left;
display:inline-block;
position:relative;
font-size:14px;
}
.menu > ul > li > a {
padding:3px 40px;
display:inline-block;
text-shadow:0px 0px 0px rgba(0,0,0,0.4);
}
.menu > ul > li:hover > a, .menu > ul > a {
background:#f1dae8;
}
.menu > ul > li#selected >a{
color: #ffeff8;
background: #c864a1;
}
/*----- Bottom Level -----*/
.menu li:hover .sub-menu {
z-index:1;
opacity:1;
}
.sub-menu {
width:100%;
padding:0px 0px;
position:absolute;
top:100%;
left:0px;
z-index:-1;
opacity:0;
transition:opacity linear 0.15s;
box-shadow:0px 0px 0px rgba(0,0,0,0.2);
}
.sub-menu li {
display:block;
font-size:12px;
text-transform: lowercase;
font-kerning: auto;
}
.sub-menu li a {
padding:10px 30px;
display:block;
background: #ffeff8;
}
.sub-menu li a:hover, .sub-menu a {
background: #f1dae8;
}
<div class="menu-wrap">
<nav class="menu">
<ul class="clearfix">
<li id="selected">
about <span class="arrow">▼</span>
<ul class="sub-menu">
<li>history</li>
<li>values</li>
<li>the truck</li>
<li>produce info.</li>
</ul>
</li>

Can't Get Nav Bar to Stretch 100%

The header stretches 100% fine but I can't seem to get the nav bar to stretch while maintaining the dropdowns. Most of my solutions have made the nav bar turn into a vertical bar and I don't want that. Any help would be appreciated.
Here is my code:
HTML
<header>
<img src="http://i.imgur.com/cosDXx1.png"/>
</header>
<nav>
<ul>
<li>Home</li>
<li>About
<!-- First Tier Drop Down -->
<ul>
<li>History</li>
<li>Brothers</li>
</ul>
</li>
<li>Philanthropy
<!-- First Tier Drop Down -->
<ul>
<li>Kovacs Walk</li>
<li>Greek God</li>
<li>Boys & Girls Club
<!-- Second Tier Drop Down -->
</ul>
</li>
<li>Membership</li>
<li>Photos</li>
<li>Contact</li>
</ul>
CSS
body {
margin:0px;
padding:0px;
}
header {
height:105px;
background-color:black;
text-align:center;
}
header img{
display:inline-block;
margin-right:auto;
margin-left:auto;
margin-right:auto;
}
nav {
width:100%;
}
nav ul {
padding:0;
list-style: none;
position: relative;
display:block;
float:left;
clear:right;
}
nav ul li {
display:list-item;
list-style: none;
background-color:#64abfb;
border-bottom:solid #2ecc71;
float:left;
}
nav ul li a {
display:block;
padding:15px 10px;
color:#FFF;
font-size:15px;
text-decoration:none;
font-family: 'Bree Serif', 'serif';
}
li a:hover {
background-color: #2ecc71;
text-decoration:none;
}
/* The Dropdown Styles */
/* =================== */
/* Hide Dropdowns by Default */
nav ul ul {
display: none;
position: absolute; top: 58px;
}
/* Display Dropdowns on Hover */
nav ul li:hover > ul {
display:list-item;
}
/* Fisrt Tier Dropdown */
nav ul ul li {
width:170px;
float:none;
position: relative;
border-bottom:none;
}
Heres a fiddle: http://jsfiddle.net/5dukbrsp/
Check this fiddle
I've given nav ul and nav ul li width as 100% and 16.66% respectively.Why 16.66%, because total width is 100% and you have 6 list items to show up. So 100/6=16.66
Hope you understood.
I've changed your css as follows
header img {
display:inline-block;
margin-right:auto;
margin-left:auto;
margin-right:auto;
}
nav {
width:100%;
float:left;
}
nav ul {
padding:0;
list-style: none;
position: relative;
display:block;
float:left;
clear:right;
width:100%;
}
nav ul li {
width:16.66%;
display:list-item;
list-style: none;
background-color:#64abfb;
border-bottom:solid #2ecc71;
float:left;
}
nav ul li a {
display:block;
padding:15px 10px;
color:#FFF;
font-size:15px;
text-decoration:none;
font-family:'Bree Serif', 'serif';
}
li a:hover {
background-color: #2ecc71;
text-decoration:none;
}
/* The Dropdown Styles */
/* =================== */
/* Hide Dropdowns by Default */
nav ul ul {
display: none;
position: absolute;
top: 58px;
}
/* Display Dropdowns on Hover */
nav ul li:hover > ul {
display:list-item;
}
/* Fisrt Tier Dropdown */
nav ul ul li {
width:170px;
float:none;
position: relative;
border-bottom:none;
}
The nav background wont stretch as there is no background on it! There is only the background on the links themselves. In this example I have changed the method of displaying your links horizontally from floats to display: inline-block.
Have an example (not centered)
Example with centered navigation using nav ul { text-align: center; }
Place your background on the nav:
nav {
width:100%;
background-color:#64abfb;
}
Change the nav ul li display to inline-block and remove the float.
nav ul li {
list-style: none;
background-color:#64abfb;
border-bottom:solid #2ecc71;
display: inline-block
}
Change the value of top to fix the gap in the dropdowns:
nav ul ul {
display: none;
position: absolute;
top: 50px;
}
The Complete CSS
body {
margin:0px;
padding:0px;
}
header {
height:105px;
background-color:black;
text-align:center;
}
header img{
display:inline-block;
margin: 0 auto;
}
nav {
width:100%;
background-color:#64abfb;
}
nav ul {
padding:0;
list-style: none;
position: relative;
display:block;
font-size: 0;
text-align: center;
}
nav ul li {
list-style: none;
background-color:#64abfb;
border-bottom:solid #2ecc71;
display: inline-block;
}
nav ul li a {
display:block;
padding:15px 10px;
color:#FFF;
font-size:15px;
text-decoration:none;
font-family: 'Bree Serif', 'serif';
}
li a:hover {
background-color: #2ecc71;
text-decoration:none;
}
/* The Dropdown Styles */
/* =================== */
/* Hide Dropdowns by Default */
nav ul ul {
display: none;
position: absolute; top: 50px;
}
/* Display Dropdowns on Hover */
nav ul li:hover > ul {
display:list-item;
}
/* First Tier Dropdown */
nav ul ul li {
width:170px;
float:none;
position: relative;
border-bottom:none;
display: block;
text-align: left;
}

Dropdown navigation menu bar is working in IE7 but not in FireFox

I have a dropdown bar -
<div class="buttonContainer">
<ul>
<li>
<a class="menu1one" href="">Dashboard</a>
</li>
</ul>
<ul>
<li>
<div class="noLink">Tasks</div>
<ul>
<li>View</li>
<li>Edit</li>
<!--[if lte IE 6]></a><![endif]-->
</ul>
<!--[if lte IE 6]></a><![endif]-->
</li>
<li>
<div class="noLink">Dictionaries</div>
<ul>
<li>Needs</li>
<li>Activities</li>
</ul>
<!--[if lte IE 6]></a><![endif]-->
</li>
<li>
<div class="noLink">Admin</div>
<ul>
<li>User Accounts</li>
</ul>
<!--[if lte IE 6]></a><![endif]-->
</li>
</ul>
</div>
CSS -
/*dropdown menu*/
.menu { float:left; width:100%; font-family: arial; border-top:1px solid #4c597f; background-color: #1079b5; min-width:950px; }
.menu .buttonContainer { padding:0 0 0 200px; }
.menu ul { padding:0; margin:0; list-style-type:none; }
.menu ul li { margin:0; float:left; position:relative; background-color:#153d71; }
.menu ul li a, .menu ul li a:visited { float:left; display:block; text-decoration:none; color:#ddf; padding:0px 16px; line-height:25px; height:30px; }
.menu ul li a:hover { background-color:#9fc1ed; color: #153d71;}
.noLink { display:block; color:#ddf; padding:0px 16px; line-height:25px; height:30px; }
.menu ul li:hover { width:auto; }
.menu ul li ul { display: none; }
/* specific to non IE browsers */
.menu ul li:hover ul { display:block; position:absolute; top:30px; left:0; width:154px; border-bottom:1px solid #000; }
.menu ul li:hover ul.endstop { left:-92px; }
.menu ul li:hover ul li ul { display: none; }
.menu ul li:hover ul li a { display:block; background:#1079b5; color:#000; height:auto; line-height:15px; padding:4px 16px; width:120px; border:1px solid #000; border-bottom:0; }
.menu ul li:hover ul li a.drop { background:#ccd no-repeat 3px 8px; }
.menu ul li:hover ul li a:hover { background-color: #153d71; color: #FFFFFF; }
.menu ul li:hover ul li a:hover.drop { background: #ccd no-repeat 3px 8px; }
.menu ul li:hover ul li:hover ul { display:block; position:absolute; left:153px; top:-1px; }
.menu ul li:hover ul li:hover ul.left { left:-153px; }
/* IE6 */
.menu ul li a:hover ul { display:block; position:absolute; top:30px; t\op:33px; background:#153d71; left:0; border-bottom:1px solid #000; }
.menu ul li a:hover ul.endstop { left: -92px; }
.menu ul li a:hover ul li a { display:block; background:#153d71; color:#000; height:1px; line-height:15px; padding:4px 16px; width:154px; w\idth:120px; border:1px solid #000; border-bottom:0; }
.menu ul li a:hover ul li a.drop { background:#ccd url('') no-repeat 3px 8px; padding-bottom:4px; }
.menu ul li a:hover ul li a ul { visibility:hidden; position:absolute; height:0; width:0; }
.menu ul li a:hover ul li a:hover { color:#000; background: #ccd url('') no-repeat 3px 8px; }
.menu ul li a:hover ul li a:hover.drop { background: #ccd url('') no-repeat 3px 8px; }
.menu ul li a:hover ul li a:hover ul { visibility:visible; position:absolute; top:0; color:#000; left:153px; }
.menu ul li a:hover ul li a:hover ul.left { left:-153px; }
The dropdown menu is working well or showing up on hover in IE7 but not responding in Firefox.
Could anybody help me with this please?? I tried position : relative for inner li a:hover and it shows the menu but extends the whole div till its end. What is to be changed here?
Also, i don't want to use javascript/jquery for this.
-thanks
EDITED - I have found the solution to get it to work. I added 'position: absolute;' attribute to the .menu{} in the css. That made it work... Thanks.
I just tested on IE7 its working fine to me
http://jsfiddle.net/vcN5g/
I have found the solution to get it to work. I added 'position: absolute;' attribute to the .menu{} in the css. That made it work... Thanks.