Nav with div inside (two different menus) - html

I made an image of what I would like to do, sort of, but I cant seem to work it out.
What I would like:
I currently have the nav but it is all in a div, what I want to do, is to divide it, have two different divs and each with different content.
Here's my actual code.
UPDATED:
CSS
#nav
{
position:fixed;
top: 0;
left: 0;
width: 100%;
height:7%;
text-align: center;
padding: .5em 0 1em 0;
z-index: 1;
overflow: hidden;
background-image: -webkit-gradient(
linear,
right top,
left bottom,
color-stop(0, #E1A141),
color-stop(0.43, #DF7266)
);
background-image: -o-linear-gradient(left bottom, #E1A141 0%, #DF7266 43%);
background-image: -moz-linear-gradient(left bottom, #E1A141 0%, #DF7266 43%);
background-image: -webkit-linear-gradient(left bottom, #E1A141 0%, #DF7266 43%);
background-image: -ms-linear-gradient(left bottom, #E1A141 0%, #DF7266 43%);
background-image: linear-gradient(to left bottom, #E1A141 0%, #DF7266 43%);
}
div#a
{
float: left !important;
width: 50%;
display:inline !important;
}
div#b
{
float: left !important;
width: 50%;
}
#nav > ul
{
width:40%;
line-height: 0px;
display: inline-block;
}
#nav > ul:before,
#nav > ul:after
{
content: 'sentido';
width: 300%;
position: absolute;
top: 50%;
margin-top: -2px;
height: 5px;
border-top: solid 1px rgba(192,192,192,0.35);
border-bottom: solid 1px rgba(192,192,192,0.35);
}
#nav > ul:before
{
left: 100%;
margin-left: 1px;
}
#nav > ul:after
{
right: 100%;
margin-right: 1px;
}
#nav > ul > li
{
display: inline-block;
margin: -9px 0.5em 0 0.5em;
border-radius: 0.5em;
padding: 0.85em;
border: solid 1px transparent;
-moz-transition: color 0.35s ease-in-out, border-color 0.35s ease-in-out;
-webkit-transition: color 0.35s ease-in-out, border-color 0.35s ease-in-out;
-o-transition: color 0.35s ease-in-out, border-color 0.35s ease-in-out;
-ms-transition: color 0.35s ease-in-out, border-color 0.35s ease-in-out;
transition: color 0.35s ease-in-out, border-color 0.35s ease-in-out;
}
#nav > ul > li.active
{
border-color: rgba(192,192,192,0.35);
}
#nav > ul > li > a,
#nav > ul > li > span
{
display: block;
color: inherit;
text-decoration: none;
border: 0;
outline: 0;
}
#nav > ul > li > ul
{
display: none;
}
html
<nav id="nav" style="z-index: 9999;" id="navigation">
<div id="a">
<ul>
<li>Inicio</li>
<li>Encuentra</li>
<li>Aventura al Azar</li>
<li>Contacto</li>
</ul>
</div>
<div id="b"> holibebe </div>
</nav>
Any help will be greatly appreciated.
Thanks,
Enrique Bravo.

Set your divs(1 and 2) to be 50% of their parent, in this case the nav element then float the divs and clear them.
BASIC example, going off of your image:
JsFiddle Example

Related

Mob Nav Menu Shows & Hides on Media Query Shrink

If you look at code, when shrinking page, the menu quickly shows up and then slides back down. I'd like it to not show up at all when page shrinks. I can't understand why this is happening.
I assume it may be smth with transitions on #nav instead of input[type="checkbox"]:checked + #nav, but i need to have animation on #nav. I had separate file I played with just for mobile nav and it worked fine. As soon as I started working with media queries things go south.
here's fiddle:
https://jsfiddle.net/reizer/fwzsxrnt/
* {margin:0;padding:0;border:0;list-style:none;font-size:100%;font:inherit;vertical-align:baseline;}
/*RESET*/
body {font: 1em Arial, Helvetica, sans-serif;}
#wrapper {
max-width: 960px;
margin: auto;
}
#nav {
display: block;
max-height: 0em;
overflow: hidden;
transition: max-height 0.5s ease;
-webkit-transition: max-height 0.5s ease;
-moz-transition: max-height 0.5s ease;
-o-transition: max-height 0.5s ease;
}
input[type="checkbox"] {
position: absolute;
margin-top: -100em;
}
input[type="checkbox"]:checked + #nav{
max-height: 20em;
}
label {
background: #9c0;
cursor: pointer;
display: block;
overflow: auto;
padding-left: 1em;
background-color: #9C0;
background: -moz-linear-gradient(top, #99cc00 0%, #85b100 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#99cc00), color-stop(100%,#85b100));
background: -webkit-linear-gradient(top, #99cc00 0%,#85b100 100%);
background: -o-linear-gradient(top, #99cc00 0%,#85b100 100%);
background: -ms-linear-gradient(top, #99cc00 0%,#85b100 100%);
background: linear-gradient(to bottom, #99cc00 0%,#85b100 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#99cc00', endColorstr='#85b100',GradientType=0 );
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
color: #FFF;
font-size: 1.6em;
line-height: 2.6em;
}
label:after {
content: "\f039";
float: right;
background-color: #669900;
padding: 0.2em 0.3em 0.1em;
margin: 0.5em;
font: 1.2em FontAwesome;
border-radius: 0.3em;
-webkit-box-shadow: inset 0em 0.1em 0.2em 0em rgba(0,0,0,0.3);
-moz-box-shadow: inset 0em 0.1em 0.2em 0em rgba(0,0,0,0.3);
box-shadow: inset 0em 0.1em 0.2em 0em rgba(0,0,0,0.3);
}
#nav ul li a {
background: #690;
border: solid #90c12f;
border-width: 1px 0 0;
text-decoration: none;
padding: 1em;
display: block;
color: #FFF;
}
#nav ul li a:hover, #nav ul li a:active {
background: #abd728;
}
#media screen and (min-width: 479px) {
.d----onttouchshituntilthispoin----t {
}
label {
display:none;
}
#nav {
display: table;
width: 100%;
max-height: 20em;
overflow: auto;
}
#nav ul {
display: table-row;
}
#nav ul li {
display: table-cell;
}
#nav ul li a {
color: #000;
position: relative;
text-align: center;
text-indent: 20px;
border: solid #000;
border-width: 0 1px 0 0;
line-height: 3.4em;
padding: 0px 20px 0px 0px;
transition: all 0.5s ease;
-webkit-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
} #nav ul li:last-child a{border:none}
#nav ul li a:hover {
position: relative;
text-indent: 0px;
padding-right: 40px;
}
#nav ul li a:before {
font-family: FontAwesome;
content: "\f078";
position: absolute;
right: 1em;
margin-top: -0.85em;
visibility: hidden;
opacity: 0;
-webkit-transition: all 0.5s ease;
transition: all 0.5s ease;
-o-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
}
#nav ul li a:hover:before {
margin-top: 0em;
visibility: visible;
opacity: 1;
}
#nav ul li a ul li {
position: absolute;
background: #FF0;
display: block;
width: 100%;
height: 0em;
visibility: hidden;
opacity: 0;
border-radius: 0px 0px 5px 5px;
-moz-border-radius: 0px 0px 5px 5px;
-webkit-border-radius: 0px 0px 5px 5px;
-webkit-transition: height 0.5s ease, opacity 0.0s ease 0.5s, visibility 0.0s ease 0.5s;
transition: height 0.5s ease, opacity 0.0s ease 0.5s, visibility 0.0s ease 0.5s;
-o-transition: height 0.5s ease, opacity 0.0s ease 0.5s, visibility 0.0s ease 0.5s;
-moz-transition: height 0.5s ease, opacity 0.0s ease 0.5s, visibility 0.0s ease 0.5s;
}
#nav ul li a:hover ul li {
visibility: visible;
opacity: 1;
height: 1em;
-webkit-transition:height 0.5s ease;
transition:height 0.5s ease;
-o-transition:height 0.5s ease;
-moz-transition:height 0.5s ease;
}
<div id="wrapper"><div id="logo"></div><label for="toggle">menu</label>
<input type="checkbox" id="toggle">
<div id="nav">
<ul>
<li>Home<ul><li></li></ul></li>
<li>About<ul><li></li></ul></li>
<li>Products<ul><li></li></ul></li>
<li>FAQ<ul><li></li></ul></li>
<li>Support<ul><li></li></ul></li>
<li>Contact<ul><li></li></ul></li>
</ul>
</div>
test
</div>
Just remove max-height: 20em; from #nav in the media query.
JSFiddle Here
* {
margin: 0;
padding: 0;
border: 0;
list-style: none;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/*RESET*/
body {
font: 1em Arial, Helvetica, sans-serif;
}
#wrapper {
max-width: 960px;
margin: auto;
}
#nav {
display: block;
max-height: 0em;
overflow: hidden;
transition: max-height 0.5s ease;
-webkit-transition: max-height 0.5s ease;
-moz-transition: max-height 0.5s ease;
-o-transition: max-height 0.5s ease;
}
input[type="checkbox"] {
position: absolute;
margin-top: -100em;
}
input[type="checkbox"]:checked + #nav {
max-height: 20em;
}
label {
background: #9c0;
cursor: pointer;
display: block;
overflow: auto;
padding-left: 1em;
background-color: #9C0;
background: -moz-linear-gradient(top, #99cc00 0%, #85b100 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #99cc00), color-stop(100%, #85b100));
background: -webkit-linear-gradient(top, #99cc00 0%, #85b100 100%);
background: -o-linear-gradient(top, #99cc00 0%, #85b100 100%);
background: -ms-linear-gradient(top, #99cc00 0%, #85b100 100%);
background: linear-gradient(to bottom, #99cc00 0%, #85b100 100%);
filter: progid: DXImageTransform.Microsoft.gradient(startColorstr='#99cc00', endColorstr='#85b100', GradientType=0);
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
color: #FFF;
font-size: 1.6em;
line-height: 2.6em;
}
label:after {
content: "\f039";
float: right;
background-color: #669900;
padding: 0.2em 0.3em 0.1em;
margin: 0.5em;
font: 1.2em FontAwesome;
border-radius: 0.3em;
-webkit-box-shadow: inset 0em 0.1em 0.2em 0em rgba(0, 0, 0, 0.3);
-moz-box-shadow: inset 0em 0.1em 0.2em 0em rgba(0, 0, 0, 0.3);
box-shadow: inset 0em 0.1em 0.2em 0em rgba(0, 0, 0, 0.3);
}
#nav ul li a {
background: #690;
border: solid #90c12f;
border-width: 1px 0 0;
text-decoration: none;
padding: 1em;
display: block;
color: #FFF;
}
#nav ul li a:hover,
#nav ul li a:active {
background: #abd728;
}
#media screen and (min-width: 479px) {
.d----onttouchshituntilthispoin----t {} label {
display: none;
}
#nav {
display: table;
width: 100%;
overflow: auto;
}
#nav ul {
display: table-row;
}
#nav ul li {
display: table-cell;
}
#nav ul li a {
color: #000;
position: relative;
text-align: center;
text-indent: 20px;
border: solid #000;
border-width: 0 1px 0 0;
line-height: 3.4em;
padding: 0px 20px 0px 0px;
transition: all 0.5s ease;
-webkit-transition: all 0.5s ease;
-o-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
}
#nav ul li:last-child a {
border: none
}
#nav ul li a:hover {
position: relative;
text-indent: 0px;
padding-right: 40px;
}
#nav ul li a:before {
font-family: FontAwesome;
content: "\f078";
position: absolute;
right: 1em;
margin-top: -0.85em;
visibility: hidden;
opacity: 0;
-webkit-transition: all 0.5s ease;
transition: all 0.5s ease;
-o-transition: all 0.5s ease;
-moz-transition: all 0.5s ease;
}
#nav ul li a:hover:before {
margin-top: 0em;
visibility: visible;
opacity: 1;
}
#nav ul li a ul li {
position: absolute;
background: #FF0;
display: block;
width: 100%;
height: 0em;
visibility: hidden;
opacity: 0;
border-radius: 0px 0px 5px 5px;
-moz-border-radius: 0px 0px 5px 5px;
-webkit-border-radius: 0px 0px 5px 5px;
-webkit-transition: height 0.5s ease, opacity 0.0s ease 0.5s, visibility 0.0s ease 0.5s;
transition: height 0.5s ease, opacity 0.0s ease 0.5s, visibility 0.0s ease 0.5s;
-o-transition: height 0.5s ease, opacity 0.0s ease 0.5s, visibility 0.0s ease 0.5s;
-moz-transition: height 0.5s ease, opacity 0.0s ease 0.5s, visibility 0.0s ease 0.5s;
}
#nav ul li a:hover ul li {
visibility: visible;
opacity: 1;
height: 1em;
-webkit-transition: height 0.5s ease;
transition: height 0.5s ease;
-o-transition: height 0.5s ease;
-moz-transition: height 0.5s ease;
}
<div id="wrapper">
<div id="logo"></div>
<label for="toggle">menu</label>
<input type="checkbox" id="toggle">
<div id="nav">
<ul>
<li>Home<ul><li></li></ul>
</li>
<li>About<ul><li></li></ul>
</li>
<li>Products<ul><li></li></ul>
</li>
<li>FAQ<ul><li></li></ul>
</li>
<li>Support<ul><li></li></ul>
</li>
<li>Contact<ul><li></li></ul>
</li>
</ul>
</div>
test
</div>

Bootstrap breaking mutli-level menu

I made this menu before i just started using bootstrap. The menu is generated from the database. The HTML output is shown below.
<ul id="nav">
<li value="1">Home</li>
<li value="2">
Portfolio
<ul class='Subs'>
<li value="5">Web Design</li>
<li value="6">Graphic Design</li>
<li value="7">Logo Design</li>
<li value="8">Blog Design</li>
</ul>
</li>
<li value="3">
Projects
<ul class='Subs'>
<li value="9">Project1</li>
<li value="10">Project2</li>
<li value="11">Project3</li>
<li value="12">Project4</li>
</ul>
</li>
<li value="4">
Contact
<ul class='Subs'>
<li value="13">Support</li>
<li value="14">Quote</li>
<li value="15">General Inquiry</li>
</ul>
</li>
<li value="16">kaas</li>
</ul>
Here is the CSS i use
#nav span {
display: none;
}
#nav, #nav ul {
list-style: none outside none;
margin: 0;
padding: 0;
z-index: 99;
}
#nav {
color-stop(0, #E3E3E3),
color-stop(0.5, white)
background-image: -o-linear-gradient(bottom, #E3E3E3 0%, white 100%);
background-image: -moz-linear-gradient(bottom, #E3E3E3 0%, white 100%);
background-image: -webkit-linear-gradient(bottom, #E3E3E3 0%, white 100%);
background-image: -ms-linear-gradient(bottom, #E3E3E3 0%, white 100%);
background-image: linear-gradient(to bottom, #E3E3E3 0%, white 100%);
border-bottom: 5px solid #333333;
float: left;
margin-left: 1%;
margin-right: 1%;
position: relative;
width: 98%;
}
#nav ul.subs {
color-stop(0, #E3E3E3),
color-stop(0.5, white)
background-color: -o-linear-gradient(bottom, white 0%, #E3E3E3 100%);
background-image: -moz-linear-gradient(bottom, white 0%, #E3E3E3 100%);
background-image: -webkit-linear-gradient(bottom, white 0%, #E3E3E3 100%);
background-image: -ms-linear-gradient(bottom, white 0%, #E3E3E3 100%);
background-image: linear-gradient(to bottom, white 0%, #E3E3E3 100%);
box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.2);
color: #333333;
display: none;
left: 0;
padding: 2%;
position: absolute;
top: 54px;
width: 96%;
}
#nav > li {
border-bottom: 5px solid transparent;
float: left;
margin-bottom: -5px;
text-align: left;
-moz-transition: all 300ms ease-in-out 0s;
-ms-transition: all 300ms ease-in-out 0s;
-o-transition: all 300ms ease-in-out 0s;
-webkit-transition: all 300ms ease-in-out 0s;
transition: all 300ms ease-in-out 0s;
}
#nav li{
display: block;
text-decoration: none;
-moz-transition: color 450ms ease-in-out 0s, background-color 450ms ease-in-out 0s;
-ms-transition: color 450ms ease-in-out 0s, background-color 450ms ease-in-out 0s;
-o-transition: color 450ms ease-in-out 0s, background-color 450ms ease-in-out 0s;
-webkit-transition: color 450ms ease-in-out 0s, background-color 450ms ease-in-out 0s;
transition: color 450ms ease-in-out 0s, background-color 450ms ease-in-out 0s;
white-space: normal;
}
#nav > li{
color: #333333;
display: block;
font-size: 1.3em;
line-height: 49px;
padding: 0 15px;
text-transform: uppercase;
}
#nav > li:hover, #nav :hover {
background-color: #F55856;
color: #FFFFFF;
cursor: pointer;
}
#nav li.active > li{
background-color: #333333;
color: #FFFFFF;
}
#nav li:hover ul.subs {
display: block;
}
#nav ul.subs > li {
display: inline-block;
float: none;
padding: 10px 1%;
vertical-align: top;
width: 33%;
}
#nav ul.subs > li{
color: #777777;
line-height: 20px;
}
#nav ul.subs > li{
font-size: 1.3em;
margin-bottom: 10px;
text-transform: uppercase;
}
#nav ul.subs > li{
float: none;
padding-left: 8px;
font-size: 0.8em;
margin: 0px;
padding: 5px;
-moz-transition: padding 150ms ease-out 0s;
-ms-transition: padding 150ms ease-out 0s;
-o-transition: padding 150ms ease-out 0s;
-webkit-transition: padding 150ms ease-out 0s;
transition: padding 150ms ease-out 0s;
}
#nav ul.subs > li li:hover {
padding-left: 15px;
}
#nav ul.subs > li:hover{
color: red;
cursor: pointer;
}
Without bootstrap it looks fabulous, so could anybody explain to me how this is happening and this can be fixed?
Thanks in advance
You put an uppercase letter at the beginning of the class Subs when it should actually be subs, which, if you check your CSS is a correct match.
DEMO JSFiddle

HTML5 - stop wrapping

I've tried suggestions from other answers like, white-space: wrapnow;, nothing's worked so far. My question is, how do I stop the wrapping of text in HTML?
The text on the navbar moves out of position as I minimize my browser, how do I stop this om happening?
Here's a pic of the problem...
My CSS
.menu,
.menu ul,
.menu li,
.menu a {
margin: 0;
padding: 0;
border: none;
outline: none;
white-space: nowrap;
}
.menu {
margin-top: -8px;
height: 50px;
width: 100%;
position: absolute; right: 0; left: 0;
text-align: left;
background: rgb(63,76,107); /* Old browsers */
background: -moz-linear-gradient(top, rgba(63,76,107,1) 0%, rgba(63,76,107,1) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(63,76,107,1)), color-stop(100%,rgba(63,76,107,1))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, rgba(63,76,107,1) 0%,rgba(63,76,107,1) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, rgba(63,76,107,1) 0%,rgba(63,76,107,1) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, rgba(63,76,107,1) 0%,rgba(63,76,107,1) 100%); /* IE10+ */
background: linear-gradient(to bottom, rgba(63,76,107,1) 0%,rgba(63,76,107,1) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#3f4c6b', endColorstr='#3f4c6b',GradientType=0 ); /* IE6-9 */
box-shadow: 0px 1px 3px #000000;
-webkit-border-radius: 1px;
-moz-border-radius: 1px;
border-radius: 1px;
}
.menu li {
position: relative;
list-style: none;
float: left;
display: block;
height: 40px;
}
.menu li a { /* Navigation Bar text */
display: block;
padding: 0 20px;
margin: 15px 0;
line-height: 15px;
text-decoration: none;
font-family: sans-serif;
font-weight: bold;
font-size: 12px;
color: #FFFFFF;
/* text-shadow: 1px 1px 1px rgba(255,255,255,0.3); */
-webkit-transition: color .4s ease-in-out;
-moz-transition: color .4s ease-in-out;
-o-transition: color .4s ease-in-out;
-ms-transition: color .4s ease-in-out;
transition: color .4s ease-in-out;
}
.menu li:first-child a{ border-left: none; }
.menu li:last-child a{ border-right: none; }
.menu li:hover > a { text-decoration: underline; }
.menu li#navbar-logo:hover > a { text-decoration: none; }
.menu ul {
position: absolute;
top: 35px;
left: 0;
opacity: 0;
background: rgba(63,76,107,1);
border-left: 1px solid #393942;
border-bottom: 1px solid #393942;
border-right: 1px solid #393942;
-webkit-border-radius: 0 0 2px 2px;
-moz-border-radius: 0 0 2px 2px;
border-radius: 0 0 2px 2px;
-webkit-transition: opacity .75s ease .1s;
-moz-transition: opacity .75s ease .1s;
-o-transition: opacity .75s ease .1s;
-ms-transition: opacity .75s ease .1s;
transition: opacity .75s ease .1s;
}
.menu li:hover > ul {
opacity: 1;
}
.menu ul li {
height: 0;
overflow: hidden;
padding: 0;
-webkit-transition: height .25s ease .1s;
-moz-transition: height .25s ease .1s;
-o-transition: height .25s ease .1s;
-ms-transition: height .25s ease .1s;
transition: height .25s ease .1s;
}
.menu li:hover > ul li {
height: 35px;
overflow: visible;
padding: 0;
}
.menu ul li a {
width: 100px;
padding: 10px 0 10px 10px;
margin: 0;
border: none;
border-bottom: 1px solid #353539;
}
.menu ul li:last-child a {
border: none;
}
.menu li#navbar-logo,
.menu li#navbar-about,
.menu li#navbar-shop,
.menu li#navbar-contact,
.menu li#navbar-community {
margin-top: 5px;
}
.menu li#navbar-logo {
margin-top: 3px;
}
.menu li#navbar-logo,
.menu li#navbar-about,
.menu li#navbar-shop,
.menu li#navbar-contact,
.menu li#navbar-community {
margin-left: -13px;
margin-right: 5px;
}
.menu li#navbar-about,
.menu li#navbar-shop,
.menu li#navbar-contact,
.menu li#navbar-community {
margin-left: 5px;
margin-right: 5px;
}
#navbar-logo a{
color: #FFC8C8;
text-shadow: 2px 2px 2px rgba(255, 0, 0, 1);
font-size: 50px;
font-family: Intrique Script Personal Use;
}
The HTML
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Title of Webpage</title>
<link rel="stylesheet" href="main.css">
</head>
<body>
<header>
<nav class="navbar">
<ul class="menu">
<li id="navbar-logo">Arc Studios</li>
<li id="navbar-about">About Us
<ul>
<li>FAQ's</li>
<li>Our Inception</li>
<li>Locations</li>
</ul>
</li>
<li id="navbar-shop">Store
<ul>
<li>Games</li>
<li>OS's</li>
<li>Other</li>
</ul>
</li>
<li id="navbar-contact">Contact
<ul>
<li>Email</li>
<li>Help Centre</li>
</ul>
</li>
<li id="navbar-community">Community
<ul>
<li>Forums</li>
<li>Events</li>
</ul>
</li>
</ul>
</nav>
</header>
<br></br>
<footer class="footer">
<p><small>© Copyright Arc Innovations 2013, All rights reserved</small></p>
</footer>
</body>
</html>
Maybe try something like this?
.menu,
.menu ul,
.menu li,
.menu a {
margin: 0;
padding: 0;
border: none;
outline: none;
white-space: nowrap;
overflow: hidden;
}
It would be easier to debug with a http://www.jsfiddle.net example.
I believe white-space: nowrap; should work.

Dropdown hidden by parent div

My navagation menu will work in IE8 but works in IE7,9,10. It appears that the #nav_wrap is hiding the the sub menu on hover (if I expand the height of the #nav_wrap i can see the sub menu on hover but only the amount added by the parent container height). I am lost at this point and have no idea how to resolve it since it works in all other IEs, Chrome, Safari and Moz. Any please have an idea???
HTML
<div id="nav_wrap">
<div id="nav">
<?php wp_nav_menu( array( 'theme_location' => 'header-menu',) ); ?>
</div>
</div>
CSS
#nav_wrap {
height: 38px;
width: 100%;
margin: -20px auto;
position: absolute;
left: 0;
z-index: 400;
}
/*-- Nav --*/
#nav {
width: 648px;
height: 98%;
z-index: 10;
margin: 0px auto;
font-family: 'Marcellus SC', serif;
font-size: 16px;
letter-spacing: 1px;
font-style:italic;
z-index: 400;
background: #dc0000; /* Old browsers */
background: -moz-linear-gradient(top, #dc0000 0%, #650101 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#dc0000), color-stop(100%,#650101)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #dc0000 0%,#650101 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #dc0000 0%,#650101 100%); /* Opera11.10+ */
background: -ms-linear-gradient(top, #dc0000 0%,#650101 100%); /* IE10+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dc0000', endColorstr='#650101',GradientType=0 ); /* IE6-9 */
background: linear-gradient(top, #dc0000 0%,#650101 100%); /* W3C */
}
#nav ul,
#nav li,
div.menu ul,
div.menu ul li,
ul.menu, ul.menu li {
list-style: none;
padding: 0;
margin: 0;
display: inline;
}
#nav ul li {
float: left;
position: relative;
}
#nav ul li a {
display: block;
padding: 8px 12px;
margin: 1px;
font-size: 15px;
white-space: nowrap;
border-radius: 24px;
color: white;
-webkit-transition: color .3s ease-in-out;
-moz-transition: color .3s ease-in-out;
-o-transition: color .3s ease-in-out;
}
#nav ul li a:hover { color: #081b3d; }
#nav ul ul {
position: absolute;
top: -99999px;
left: 0;
opacity: 0; /* Hide sub level */
-webkit-transition: opacity .5s ease-in-out;
-moz-transition: opacity .5s ease-in-out;
-o-transition: opacity .5s ease-in-out;
z-index: 1497;
background: #dc0000;
padding: 2px;
border: 1px solid #dc0000;
border-top: none;
box-shadow: #111 0 3px 14px;
border-bottom-left-radius: 6px;
border-bottom-right-radius: 6px;
}
#nav ul ul ul {
position: absolute;
top: -99999px;
left: 100%;
opacity: 0;
-webkit-transition: opacity .5s ease-in-out; /* Hide sub levels */
-moz-transition: opacity .5s ease-in-out;
-o-transition: opacity .5s ease-in-out;
border-radius: 6px;
border: 1px solid #dc0000;
}
#nav ul li:hover > ul {
opacity: 1;
position: absolute;
top: 99%;
left: 0;
z-index: 497;
}
#nav ul ul li:hover > ul {
position: absolute;
top: 0;
left: 100%;
opacity: 1;
z-index: 497;
background: #081b3d;
}
the site
For those who ever had this it was fixed by removing
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dc0000', endColorstr='#650101',GradientType=0 ) !important; /* IE6-9 */
from all the nav containers. Not sure why.

background color and sub menu constantly toggling hover state in IE

This has been the bane of my week at the moment. Basically i have a pure CSS drop down menu that combines both standard lists and content boxes as sub menus. I am having trouble specifically in IE where each LI has an tag that is display block, so should fill the parent LI. so i am able to hover and click anywhere in the LI and the links hover, active states are on.
what's happening is in IE if i hover over the text the hover state styles are applied with no issue, however if i move the mouse off the text but still within the LI the hover is constantly being applied and then removed (see dev.altech-uk.com).
It is slightly annoying because the sub-menus are then flickering on and off all the time and also you may miss the sub menu. None of this happens in FF, chrome, opera, safari.
Heres the CSS code regarding to this:
div.navBG ul.navMenu {width: 1000px; margin: 0 auto; display: block; padding: 0; height: 35px; text-align: center;}
div.navBG ul.navMenu > li {display: inline-block; list-style: none; position: relative; margin: 0 -4px; padding: 0;}
div.navBG ul.navMenu > li:hover:after {bottom: 0; border: solid transparent; content: " "; height: 0; width: 0; position: absolute; z-index: 999;}
div.navBG ul.navMenu > li:hover:after {border-color: rgba(146, 200, 236, 0); border-bottom-color: #92C8EC; border-width: 10px; left: 50%; margin-left: -10px;}
div.navBG ul.navMenu > li > a {display: block; line-height: 35px; text-align: center; text-decoration: none; font-size: 11px; color: #FFF; height: 100%; width: 100%;}
div.navBG ul.navMenu > li > a:hover {background: -moz-linear-gradient(top, #162d54 13%, #002d5e 28%, #0f233d 61%); background: -webkit-gradient(linear, left top, left bottom, color-stop(13%,#162d54), color-stop(28%,#002d5e), color-stop(61%,#0f233d)); background: -webkit-linear-gradient(top, #162d54 13%,#002d5e 28%,#0f233d 61%); background: -o-linear-gradient(top, #162d54 13%,#002d5e 28%,#0f233d 61%); background: -ms-linear-gradient(top, #162d54 13%,#002d5e 28%,#0f233d 61%); background: linear-gradient(to bottom, #162d54 13%,#002d5e 28%,#0f233d 61%); -ms-filter: "progid:DXImageTransform.Microsoft.gradient( startColorstr='#162d54', endColorstr='#0f233d',GradientType=0 )";}
/*div.navBG ul.navMenu > li:hover {background: -moz-linear-gradient(top, #162d54 13%, #002d5e 28%, #0f233d 61%); background: -webkit-gradient(linear, left top, left bottom, color-stop(13%,#162d54), color-stop(28%,#002d5e), color-stop(61%,#0f233d)); background: -webkit-linear-gradient(top, #162d54 13%,#002d5e 28%,#0f233d 61%); background: -o-linear-gradient(top, #162d54 13%,#002d5e 28%,#0f233d 61%); background: -ms-linear-gradient(top, #162d54 13%,#002d5e 28%,#0f233d 61%); background: linear-gradient(to bottom, #162d54 13%,#002d5e 28%,#0f233d 61%); -ms-filter: "progid:DXImageTransform.Microsoft.gradient( startColorstr='#162d54', endColorstr='#0f233d',GradientType=0 )";}*/
div.navBG ul.navMenu > li div.subMenuContainer {max-height: 0; overflow: hidden; padding: 0; position: absolute; top: 35px; visibility: hidden; z-index: 999; width: 270px; -webkit-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out; -o-transition: all 0.2s ease-in-out; -ms-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);}
div.navBG ul.navMenu > li .rightout {right: -8px;}
div.navBG ul.navMenu > li div.subMenuContainer > ul {background: #92C8EC; list-style: none; margin: 0; padding: 0; white-space: no-wrap; width: 270px; position: relative;}
div.navBG ul.navMenu > li div.subMenuContainer:after {z-index: 9999; bottom: 0; border: solid transparent; content: " "; height: 0; width: 0; position: absolute; border-bottom-color: #92C8EC; border-width: 15px; left: 50%; margin-left: -15px; border-color: rgba(146, 200, 236, 0);}
div.navBG ul.navMenu > li div.subMenuContainer > ul li {display: block; margin: 0; position: relative; vertical-align: text-top; font-size: 11px;}
div.navBG ul.navMenu > li div.subMenuContainer > ul li h4 {font-weight: 700; background: url(/img/sitewide/icon.png) no-repeat 3px center; color: #003975; font-size: 14px; padding: 7px 0 5px 42px; margin: 0; text-align: left;}
div.navBG ul.navMenu > li div.subMenuContainer > ul li a {color: #FFF; display: block; padding-left: 20px; line-height: 35px; text-decoration: none; -webkit-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out; -o-transition: all 0.2s ease-in-out; -ms-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; font-size: 1em !important; text-align: left;}
div.navBG ul.navMenu > li div.subMenuContainer > ul li a:hover {background: #3C7FAB !important;}
div.navBG ul.navMenu > li:hover div.subMenuContainer {visibility: visible;}
div.navBG ul.navMenu > li:hover .solution {max-height: 300px;}
div.navBG ul.navMenu > li:hover .machines {max-height: 600px;}
/*div.navBG ul.navMenu > li div.navMenuItemPane a.cp,
div.navBG ul.navMenu > li div.navMenuItemPane a.cp:active,
div.navBG ul.navMenu > li div.navMenuItemPane a.cp:visited {position: absolute; top: 0; left: 0; bottom: 0; right: 0;}*/
div.navBG ul.navMenu > li:hover div.navMenuItemPaneContainer {max-height: 300px; z-index: 99; height: auto; visibility: visible;}
div.navBG ul.navMenu > li div.navMenuItemPaneContainer {background: #92C8EC; box-shadow: 0 0 8px rgba(0, 0, 0, 0.3); width: 540px; visibility: hidden; left: 0; max-height: 0; overflow: hidden; padding: 0; position: absolute; top: 35px; z-index: 99; -webkit-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out; -o-transition: all 0.2s ease-in-out; -ms-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out;}
div.navBG ul.navMenu > li div.navMenuItemPaneContainer > ul {width: 540px; margin: 0; padding: 0;}
div.navBG ul.navMenu > li div.navMenuItemPaneContainer > ul li {display: inline; float: left; font-size: 11px; vertical-align: text-top; position: relative;}
div.navBG ul.navMenu > li div.navMenuItemPaneContainer > ul li a {color: #FFF; display: block; padding-left: 20px; line-height: 35px; text-decoration: none; -webkit-transition: all 0.2s ease-in-out; -moz-transition: all 0.2s ease-in-out; -o-transition: all 0.2s ease-in-out; -ms-transition: all 0.2s ease-in-out; transition: all 0.2s ease-in-out; font-size: 1em !important; text-align: left;}
div.navBG ul.navMenu > li div.navMenuItemPaneContainer > ul li a:hover {background: #3C7FAB !important;}
div.navBG ul.navMenu > li div.navMenuItemPaneContainer h4 {font-weight: 700; background: url(/img/sitewide/icon.png) no-repeat 3px center; color: #003975; font-size: 14px; padding: 7px 0 5px 42px; margin: 0; text-align: left;}
#double li {width: 50%;}
Any assistance here will be greatly appreciated
Many Thanks
Remove the filter: progid...etc. from div.navBG ul.navMenu >li > a:hover