I have created a menu and i am trying to implement a drop down menu on hover, It doesn't seem to appear correct,any help would be appreciated. Why is the drop down appearing in different position ?
<ul class="menu">
<li>Home
<ul class="menu">
<li>Home</li></ul>
</li> |
<li class="active">About</li> |
<li>Products</li> |
<li>Clients</li> |
<li>Reach Us</li>
<div class="clear"></div>
</ul>
.menu{
float:left;
color: #555555;
margin-top: 25px;
}
.menu ul {}
.menu li{
display: inline-block;
margin:6px 20px;
}
.menu li a{
display: block;
color: #000;
line-height: 1.8em;
text-transform: capitalize;
font-size: 14px;
font-weight: 400;
-webkit-transition: all 0.3s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
padding: 5px;
}
.menu li:hover > ul {
display: block;
}
.menu li.active a{
color: #52ABDF;
background: white;
}
.menu li a:hover{
color: #ooo;
background: #52ABDF;
padding: 5px;
}
.menu li ul{
display: none;
}
.menu ul li:hover ul{
display: block;
margin-left:0px;
}
.menu li ul li {
float: none;
display: inline;
}
.menu li ul li a {
position: relative;
border-left: 1px solid black;
border-right: 1px solid black;
border-bottom: 1px solid black;
background: #333;
color: #ooo;
}
.menuli ul li a:hover {
background: #066;
color: #000;
}
Here is the code pen : http://codepen.io/anon/pen/EtmAB
As a tip,
you should never use '|' symbol to seperate the <li>s, because it
makes the html meaningless. The <ul> tag is expected to have only
<li> tags as its children.. You could use the border-right property instead. and use
ul li:last-of-type(){
border: 0;
}
to eliminate the border on the last <li>
Use this css and yours would work:
.menu,
.menu li ul{
float:left;
color: #555555;
margin-top: 0;
list-style: none;
padding: 0;
}
.menu{
margin-top: 25px;
}
.menu ul:after{
content: "";
display: block;
clear: both;
}
.menu li{
float: left;
position: relative;
}
.menu li a{
display: block;
color: #000;
line-height: 2em;
text-transform: capitalize;
font-size: 14px;
font-weight: 400;
padding: 0 20px;
-webkit-transition: all 0.3s ease-in-out;
-moz-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
}
.menu li:hover > ul {
display: block;
}
.menu li.active a{
color: #52ABDF;
background: white;
}
.menu li a:hover{
color: #ooo;
background: #52ABDF;
}
.menu li ul{
display: none;
position: absolute;
background: #bbb;
}
.menu li ul li {
display: inline ;
}
.menu li ul li a {
position: relative;
border-left: 1px solid black;
border-right: 1px solid black;
border-bottom: 1px solid black;
background: #333;
color: #ooo;
}
.menuli ul li a:hover {
background: #066;
color: #000;
}
If you want to really learn how to make a better styled dropdown menu, use this tutorial:
http://andornagy.com/css-dropdown-menu/
it is pretty easy and understandable too, and not bad looking...
Related
I have to add a subnav in an existing nav using a CSS style to reach php page.
Existing nav was : nav > ul > li > a href (ok)
I did:
nav > ul > li > a href (ok)
nav > ul > li > ul > li > a href (ko)
I actually can't hover href (ko) with the cursor : items subnav disappear !
I search in CSS style but I don't really understand how it's works.
I want to click on the 2 pages linked in subnav bellow :
accountCustomerAll.php and serviceViewAll.php.
If you have an idea...
Here is my HTML code :
/* Nav Meu Styling */
.nav-menu li a {
padding: 0px;
text-decoration: none;
display: inline-block;
color: #222222;
font-weight: 500;
font-size: 12px;
text-transform: uppercase;
outline: none;
-webkit-transition: all 0.3s ease 0s;
-moz-transition: all 0.3s ease 0s;
-o-transition: all 0.3s ease 0s;
transition: all 0.3s ease 0s; }
.nav-menu li a.active, .nav-menu li a:hover {
color: #0093df !important; }
.nav-menu li:hover > a {
color: #000; }
.nav-menu > li {
margin-left: 30px; }
.nav-menu ul {
margin: 28px 0 0 0;
padding: 10px;
box-shadow: 0px 0px 30px rgba(127, 137, 161, 0.25);
background: #fff; }
.nav-menu ul li {
transition: 0.3s; }
.nav-menu ul li a {
padding: 5px 10px;
color: #333;
transition: 0.3s;
display: block;
font-size: 12px;
text-transform: none; }
.nav-menu ul li:hover > a {
color: #0093df; }
.nav-menu ul ul {
margin-right: 10px;
margin-top: 0; }
<nav id="nav-menu-container">
<ul class="nav-menu">
<li><a>Gérer l'Aérodrome</a>
<ul>
<li>Consulter les clients</li>
<li>Consulter les commandes</li>
</ul>
</li>
</ul>
</nav>
This could be helpful for you. You have to apply different css on inner <ul>.
/* /* Nav Meu Styling */
.nav-menu li {
float: left;
list-style: none; }
.nav-menu li a {
padding: 0px;
text-decoration: none;
display: inline-block;
color: #222222;
font-weight: 500;
font-size: 12px;
text-transform: uppercase;
outline: none;
-webkit-transition: all 0.3s ease 0s;
-moz-transition: all 0.3s ease 0s;
-o-transition: all 0.3s ease 0s;
transition: all 0.3s ease 0s;
}
.nav-menu li a.active,
.nav-menu li a:hover {
color: #0093df !important;
}
.nav-menu li:hover>a {
color: #000;
}
.nav-menu>ul {
padding: 10px;
box-shadow: 0px 0px 30px rgba(127, 137, 161, 0.25);
background: #fff;
}
.nav-menu ul li {
transition: 0.3s;
transition: 0.3s;
width: 75%;
}
.nav-menu ul li a {
padding: 5px 10px;
color: #333;
transition: 0.3s;
display: block;
font-size: 12px;
text-transform: none;
}
.nav-menu ul li:hover>a {
color: #0093df;
}
.nav-menu ul ul {
margin-right: 10px;
margin-top: 0;
}
.sub-menu {
display: none;
}
.sub-menu>li {
list-style: none;
float: left;
}
ul.nav-menu li a:hover+ul.sub-menu {
display: block;
}
ul.sub-menu:hover {
display: block;
}
<nav id="nav-menu-container">
<ul class="nav-menu">
<li><a>Gérer l'Aérodrome</a>
<ul class="sub-menu">
<li>Consulter les clients</li>
<li>Consulter les commandes</li>
</ul>
</li>
</ul>
</nav>
.nav-menu li a.active, .nav-menu li a:hover{ color: #0093df !important;}
Buggy :active, should be:
.nav-menu li a:active, .nav-menu li a:hover{ color: #0093df}
Please, don't use !importand, debug instead.
Nested structures are hard to maintain, easier would be
<ul><li> <ol><li> ... </li></ol></li></ul>
it is absolutely allowed to style <ol> without numbers.
My hover effect is not showing up on my first two nav menu items unless the cursor touches the top of the item. I can't click on the first two items at all unless the cursor touches the top of the item. For the other three items, the hover effect is working properly and will show up when the cursor touches the bottom of the item. I've been mucking around with this and I know I did something to mess it up, but I can't figure out what. Everything worked fine before. Thank you for any help with this!
nav {
width: 450px;
margin-top: 1em;
float: right;
}
nav ul {
font-family: Arial, sans-serif;
font-size: .80em;
list-style: none;
text-align: right;
width: 100%;
margin: 0;
padding: 2% 0;
float: right;
}
nav ul ul {
width: 244px;
margin-top: 1.1%;
padding: 0;
position: absolute;
border-bottom: none;
z-index: 9999;
opacity: 0;
visibility: hidden;
transition: all .25s ease-in;
-o-transition: all .25s ease-in;
-ms-transition: all .25s ease-in;
-moz-transition: all .25s ease-in;
-webkit-transition: all .25s ease-in;
}
nav ul li:hover ul {
display: block;
border-top: none;
visibility: visible;
opacity: 1;
}
nav ul li { display: inline-block; text-align: left; }
nav ul li:nth-of-type(1) { width: 65px; }
nav ul li:nth-of-type(2) { width: 60px; }
nav ul li:nth-of-type(3) { width: 90px; }
/*Make link stay a certain color when hovered over and left*/
nav ul li:nth-of-type(3):hover > a { color: white; }
nav ul li:nth-of-type(3).current > a { color: white; }
nav ul li:nth-of-type(4) { width: 75px; }
nav ul li:nth-of-type(5) { width: 80px; text-align: right; }
nav ul li a {
color: silver;
font-size: .90em;
font-weight: bold !important;
text-decoration: none;
text-align: left;
}
nav ul li a.active-link {
color: white;
border-bottom: 1px solid #dad700;
}
nav ul li a:hover, nav ul li a.current {
color: white;
border-bottom: 1px solid #dad700;
}
nav ul li li {
background-color: #182248;
font-size: 1.2em !important;
text-align: left;
width: 100%;
display: block;
float: left;
}
nav ul li li:nth-of-type(1) {
width: 98%;
padding: 18px 0 20px 12px;
border-left: thin solid #696969;
border-right: thin solid #696969;
border-top: thin solid #696969;
}
nav ul li li:nth-of-type(2) {
width: 98%;
padding: 12px 0 20px 12px;
border-left: thin solid #696969;
border-right: thin solid #696969;
}
nav ul li li:nth-of-type(3) {
width: 98%;
padding: 12px 0 20px 12px;
border-left: thin solid #696969;
border-right: thin solid #696969;
border-bottom: thin solid #696969;
}
nav ul li li a {
color: silver;
font-size: .90em;
border: none;
}
/*Style 'show menu' label button and hide it by default*/
.show-menu {
cursor: pointer;
display: none;
}
/*Hide checkbox*/
input[type=checkbox] { display: none; }
/*Show menu when invisible checkbox is checked*/
input[type=checkbox]:checked ~ #menu { display: block; }
<nav>
<label for="show-menu" class="show-menu"><img src="img/buggy.png" alt="Buggy Silhouette" style="position: relative; top: .25em;"> Menu</label>
<input type="checkbox" id="show-menu" role="button">
<ul id="menu">
<li>Home</li>
<li>About</li>
<li>What's Up▾
<ul class="hidden">
<li>Meetings</li>
<li>Upcoming Events</li>
<li>Buggies & Bits</li>
</ul>
</li>
<li>Membership</li>
<li>Contact</li>
</ul>
</nav>
I want to build a menu that is CSS only. No jQuery.
I've gotten this far but can't make the menu slide in from the top. Here's a fiddle (oddly enough, it doesn't look like my menu... but all the styles are there)
Some code: The HTML:
<div class="menu">
<ul>
<li class="blue"> <a style="text-decoration: none" href="/who-we-are">Who We Are</a>
</li>
<li class="red"> <a style="text-decoration: none" href="/services">Services</a>
<ul>
<li> Post 1
</li>
<li> Post 2
</li>
<li> Post 3
</li>
</ul>
</li>
<li class="orange"><a style="text-decoration: none" href="/packages">Packages</a>
<ul>
<li> Post 1
</li>
<li> Post 2
</li>
<li> Post 3
</li>
</ul>
</li>
<li class="green"><a style="text-decoration: none" href="/contact-us">Contact</a>
</li>
</ul>
</div>
And my CSS:
.menu {
float: left;
margin-top: 0px;
}
.blue, div.item.blue div {
color: #009dc4;
}
.red, div.item.red div {
color: #fe4f00;
}
.orange, div.item.orange div {
color: #ff5958;
}
.green, div.item.green div {
color: #50c402;
}
.menu ul li a {
display: block;
height: 45px;
padding-top: 18px;
}
.menu ul li a:visited {
color: inherit;
}
.menu ul {
list-style: none;
margin: 0;
}
.menu ul li {
display: inline-block;
position: relative;
cursor: pointer;
width: 145px;
font-family: Georgia;
height: 45px;
font-size: 20px;
line-height: 22px;
font-weight: bold;
padding-left: 5px;
margin-top: 0px;
margin-right: 46px;
border-bottom: 5px solid;
z-index: 5000;
}
.menu ul li:hover {
color: #ffffff !important;
}
.menu ul li.blue:hover {
background-color: #009dc4;
border-bottom: 5px solid #009dc4;
}
.menu ul li.red:hover {
background-color: #fe4f00;
border-bottom: 5px solid #fe4f00;
}
.menu ul li.orange:hover {
background-color: #ff5958;
border-bottom: 5px solid #ff5958;
}
.menu ul li.green:hover {
background-color: #50c402;
border-bottom: 5px solid #50c402;
}
.menu ul li ul {
display: none;
opacity: 0;
visibility: hidden;
position: absolute;
top: 45px;
}
.menu ul li ul li {
display: block;
font-size: 12px;
border-bottom: none;
width: 145px;
color: #ffffff;
padding-left: 0px;
height: 34px;
line-height: normal;
position: relative;
left: -5px;
}
.menu ul li ul li a {
font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;
font-weight: normal;
height: auto;
padding: 10px 5px;
font-size: 12px;
background-color: #4fc7c1;
-webkit-transition: all 0.1s;
-moz-transition: all 0.1s;
-ms-transition: all 0.1s;
-o-transition: all 0.1s;
transition: all 0.1s;
}
.menu ul li ul li a:hover {
background: #a3edf5;
}
.menu ul li:hover ul {
display: block;
opacity: 1;
visibility: visible;
}
.menu > ul > li:last-of-type {
margin-right: 0px;
}
If someone can just help with getting the slide down to work, I'd appreciate it.
Unfortunately there is no way to animate height:0 to height:auto with CSS (as of CSS3). However there is a workaround using max-height documented here: http://css3.bradshawenterprises.com/animating_height/
With that logic I have created a simple example from your JS fiddle. All it does is set the css style max-height:0 on the drop-down <ul> element, some transitions for the max-height css attribute and then a large max-height value on menu hover.
Unfortunately the max-height must be hard-coded (cannot be auto) so we are limited here; but if you are confident that your menus will never exceed say 500px then you would simply put 500px.
Here's the fiddle:
http://jsfiddle.net/6ame5wcu/4/
All you need to do is to set max-height:0; and overflow:hidden; then add a transition on it like this:
.menu ul li ul {
max-height:0em;
overflow:hidden;
position: absolute;
top: 45px;
transition:max-height .9s ease
}
on :hover set a max-height ie max-height:600px;
.menu ul li:hover ul {
max-height:600px;
}
DEMO
Full code:
<div class="menu">
<ul>
<li class="blue"> Who We Are
</li>
<li class="red"> Services
<ul>
<li> Post 1
</li>
<li> Post 2
</li>
<li> Post 3
</li>
</ul>
</li>
<li class="orange">Packages
<ul>
<li> Post 1
</li>
<li> Post 2
</li>
<li> Post 3
</li>
</ul>
</li>
<li class="green">Contact
</li>
</ul>
</div>
css
a{text-decoration: none}
.menu {
float: left;
margin-top: 0px;
}
.blue, div.item.blue div {
color: #009dc4;
}
.red, div.item.red div {
color: #fe4f00;
}
.orange, div.item.orange div {
color: #ff5958;
}
.green, div.item.green div {
color: #50c402;
}
.menu ul li a {
display: block;
height: 45px;
padding-top: 18px;
}
.menu ul li a:visited {
color: inherit;
}
.menu ul {
list-style: none;
margin: 0;
}
.menu ul li {
display: inline-block;
position: relative;
cursor: pointer;
width: 145px;
font-family: Georgia;
height: 45px;
font-size: 20px;
line-height: 22px;
font-weight: bold;
padding-left: 5px;
margin-top: 0px;
margin-right: 46px;
border-bottom: 5px solid;
z-index: 5000;
}
.menu ul li:hover {
color: #ffffff !important;
}
.menu ul li.blue:hover {
background-color: #009dc4;
border-bottom: 5px solid #009dc4;
}
.menu ul li.red:hover {
background-color: #fe4f00;
border-bottom: 5px solid #fe4f00;
}
.menu ul li.orange:hover {
background-color: #ff5958;
border-bottom: 5px solid #ff5958;
}
.menu ul li.green:hover {
background-color: #50c402;
border-bottom: 5px solid #50c402;
}
.menu ul li ul {
max-height:0em;
overflow:hidden;
position: absolute;
top: 45px;
transition:max-height .9s ease
}
.menu ul li:hover ul {
max-height:600px;
}
.menu ul li ul li {
display: block;
font-size: 12px;
border-bottom: none;
width: 145px;
color: #ffffff;
padding-left: 0px;
height: 34px;
line-height: normal;
position: relative;
left: -5px;
}
.menu ul li ul li a {
font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;
font-weight: normal;
height: auto;
padding: 10px 5px;
font-size: 12px;
background-color: #4fc7c1;
-webkit-transition: all 0.1s;
-moz-transition: all 0.1s;
-ms-transition: all 0.1s;
-o-transition: all 0.1s;
transition: all 0.1s;
}
.menu ul li ul li a:hover {
background: #a3edf5;
}
.menu > ul > li:last-of-type {
margin-right: 0px;
}
I have an existing website with the menu code below and I want to add more stuff to my site but users need to nevigate to those pages please help me to add a sub menu in dropdown to the code I have. Please help?
HTML:
<!-- Header -->
<div id="header">
<div id="nav-wrapper">
<!-- Nav -->
<nav id="nav">
<ul>
<li class="active">Homepage</li>
<li>Left Sidebar</li>
<li>Right Sidebar</li>
<li>No Sidebar</li>
</ul>
</nav>
</div>
</div>
CSS:
#nav {
}
#nav-wrapper {
background: rgba(0,0,0,.1);
position: absolute;
top: 0;
left: 0;
width: 100%;
}
#nav > ul {
margin: 0;
padding: 0;
text-align: center;
}
#nav > ul > li {
display: inline-block;
border-right: 1px solid;
border-color: rgba(255,255,255,.1);
}
#nav > ul > li:last-child {
padding-right: 0;
border-right: none;
}
#nav > ul > li > a, #nav > ul > li > span {
display: inline-block;
padding: 1.5em 1.5em;
letter-spacing: 0.06em;
text-decoration: none;
text-transform: uppercase;
font-size: 1.1em;
outline: 0;
color: #FFF;
}
#nav li.active a {
color: #FFF;
}
#nav > ul > li > ul {
display: none;
}
#nav li:hover > ul {
opacity: 1;
visibility: visible;
margin: 0;
}
Change your css like
#nav li:hover > ul
{
opacity: 1;
display: block;
margin: 0;
position:absolute;
background:green;
}
<nav id="nav">
<ul>
<li class="active">Homepage
<ul>
<li><a href="index.html">Homepage</li>
<li>Pictures</li>
<li>Contact</li>
</ul>
</li>
<li>Pictures</li>
<li>Contact</li>
</ul>
</nav>
CSS :
#nav
{
}
#nav-wrapper
{
background: rgba(0,0,0,.1);
text-align:center;
margin:0;
padding:0;
width: 100%;
}
#nav ul {
display: inline;
margin: 0;
padding: 0;
text-align: center;
padding: 15px 4px 17px 0;
list-style: none;
border-right: 1px solid;
border-color: rgba(255,255,255,.1);
color: white;
}
ul li {
border-right: 1px solid;
border-color: rgba(255,255,255,.1);
display: inline-block;
margin: -4px;
position: relative;
padding: 15px 20px;
cursor: pointer;
-webkit-transition: all 0.2s;
-moz-transition: all 0.2s;
-ms-transition: all 0.2s;
-o-transition: all 0.2s;
transition: all 0.2s;
text-align: center;
color: white;
}
ul li:hover {
border-right: 1px solid;
border-color: rgba(255,255,255,.1);
color: white;
}
ul li ul {
position: absolute;
top: 90px;
left: 0;
width: 200px;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
display: none;
opacity: 0;
visibility: hidden;
-webkit-transiton: opacity 0.2s;
-moz-transition: opacity 0.2s;
-ms-transition: opacity 0.2s;
-o-transition: opacity 0.2s;
-transition: opacity 0.2s;
}
ul li ul li {
border-right: 1px solid;
border-color: rgba(255,255,255,.1);
background: rgba(0,0,0,.1);
display: block;
text-transform: uppercase;
font-size: 1.1em;
outline: 0;
color: #FFF;
}
ul li ul li:hover { background: #666; }
ul li:hover ul {
display: block;
opacity: 1;
visibility: visible;
}
#nav ul li a,
#nav ul li span
{
display: inline-block;
padding: 1.5em 1.5em;
letter-spacing: 0.06em;
text-decoration: none;
text-transform: uppercase;
font-size: 1.1em;
outline: 0;
color: #FFF;
}
#nav li.active a
{
color: #FFF;
}
HTML :
<div id="header">
<div id="nav-wrapper">
<!-- Nav -->
<nav id="nav">
<ul>
<li class="active">Homepage</li>
<li>Pictures
<ul>
<li>test</li>
<li>test2</li>
</ul>
</li>
<li>Contact</li>
</ul>
</nav>
</div>
JSFIDDLE DEMO
I have a dropdown menu that is generated from WordPress so I do not want to change the HTML of it. i can change the CSS as needed though and I pretty much have ot working as I need it with the exception of an alignment issue with my dropdown menu.
Google Chrome
FireFox
Internet Explorer
From the images above you can see that IE and FIreFox display it the same but Chrome is always different from the 2. My Goal is to get this box to align perfectly with the right of the menu button and then get it to look that way in all 3 of these browsers.
I have extracted the HTML and CSS into a JSFiddle page for testing and playing around with here...
Code View: http://jsfiddle.net/jasondavis/hAb4k/
Full View for viewing the menu: http://jsfiddle.net/jasondavis/hAb4k/embedded/result/
My HTML
<nav id="head-nav-menu" class="nav-main" role="navigation" itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement">
<ul id="nav" class="nav nav-pills">
<li class="active menu-home">
Home
</li>
<li class="menu-about">
About
</li>
<li class="menu-projects">
Projects
</li>
<li class="menu-blog">
Blog
</li>
<li class="dropdown menu-services">
<a class="dropdown-toggle" data-toggle="dropdown" data-target="#" href="/services/">Services <b class="caret"></b></a>
<ul class="dropdown-menu">
<li class="menu-consulting">Consulting</li>
<li class="menu-magento-development">
Magento Development
</li>
<li class="menu-wordpress-development">
WordPress Development
</li>
<li class="menu-sugarcrm-development">
SugarCRM Development
</li>
<li class="menu-web-development">
Web Development
</li>
<li class="menu-seo">
SEO
</li>
</ul>
</li>
<li class="menu-contact">
Contact
</li>
</ul>
</nav>
CSS
body{
background: #40C8F4 !important;
}
nav ul, nav ol {
list-style: none;
list-style-image: none;
}
#head-nav-menu{
float: right;
margin-top: 29px;
}
#head-nav-menu li {
float: left;
position: relative;
padding: 0 2px 0 2px;
}
.nav a {
font-family: 'arial';
font-size: 18px;
padding: 8px 18px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
white-space: nowrap;
color: #fff;
opacity: 0.9;
letter-spacing: 1px;
text-decoration: none;
}
.menu-contact a {
border: 2px solid #FFF;
padding: 8px 18px;
transition: 0.05s linear;
-moz-transition: 0.05s linear;
-webkit-transition: 0.05s linear;
}
.nav .menu-contact a:hover {
background-color: #FFF;
color: #797979;
}
#nav ul a {
font-weight: 100;
}
.nav a:hover,
.nav > .active a {
opacity: 1;
background-color: #3DBCE6;
}
.nav > .active li a {
background-color: inherit;
}
.tinynav {
display: none;
width: 100%;
margin-top: .5em;
margin-bottom: .6em;
}
.nav li.button a {
background-color: rgba(255, 255, 255, 0.1);
border: 2px solid #FFF;
border-radius: 4px;
margin-top: 5px;
padding: 8px 18px;
font-family: 'ProximaNova-bold', Helvetica, Arial, sans-serif;
font-weight: normal;
margin-left: 16px;
color: #FFF !important;
}
.nav li.button a:hover {
background-color: #FFF;
opacity: 1;
color: #444 !important;
}
/* ==========================================================================
Main Container General Layout Styles
========================================================================== */
.header-container header {
padding-top: 13px;
padding-bottom: 18px;
}
/* Navigation > Dropdown Menus */
#nav .dropdown-menu,
#nav .children {
display: none;
padding: 0;
position: absolute;
z-index: 99999;
border: 1px solid #86DEFC;
width: 333%;
/*right: 8px;*/
left: -239%;
top: 23px;
background-color: #F2F9FC;
}
#nav .dropdown-menu li {
width: 195px;
float: left;
display: inline-block;
/*width: 50%;*/
}
.nav .dropdown-menu a {
color: #030303;
}
#nav li:hover > ul,
#nav ul li:hover > ul,
.dropdown:hover > ul {
display: inline-block;
-webkit-animation: fadeDown 250ms ease;
-moz-animation: fadeDown 250ms ease;
-ms-animation: fadeDown 250ms ease;
-o-animation: fadeDown 250ms ease;
animation: fadeDown 250ms ease;
background-color: #fff;
color: #000;
border: 1px solid #E9E9E9;
border-top: none;
}
#nav .dropdown-menu ul,
#nav .children ul {
left: 99.75%;
top: -1px;
}
#nav ul li,
#nav ul ul li {
margin-left: 0;
}
#nav ul li:first-child,
#nav ul ul li:first-child {
border-top: none;
}
#nav ul a,
#nav ul ul a {
font-size: 14px;
line-height: 21px;
text-align: left;
padding: 10px;
display: inline-block;
min-width: 125px;
border-bottom: none;
margin-bottom: 0 !important;
width: 100%;
letter-spacing: 1px;
font-family: arial;
}
#nav ul a:hover,
#nav ul ul a:hover {
color: #098EB9 !important;
background: none;
}
#nav ul ul.dropdown-menu a:hover {
width: 100%;
color: #63E924 !important;
border-bottom: none;
}
#nav li.current_page_item ul a,
#nav li.current-menu-parent ul a,
#nav li.current_page_parent ul a {
color: #000;
font-weight: 700;
}
#nav ul li.current-menu-item a {
color: #e9242e !important;
}
#head-nav-menu .nav li:hover a.dropdown-toggle {
background: #fff;
color: #000;
opacity: 1;
border-right: 1px solid #E7E7E7;
}
.nav .dropdown a:hover {
opacity: 1;
background-color: #fff;
}
#nav .dropdown-menu li:hover {
background: #F8F8F8;
}
Give display: block to .nav a
then remove left: 239% of #nav .dropdown-menu and give right: 2px and top: 38px to it.
Here is the edited demo for it.
http://jsfiddle.net/hAb4k/3/