Aligning a navbar - html

I just created a a navbar and a hover feature.But the problems are now that when I hover on HOME,BEDROOMS and CONTACT US,the color has no effect entirely from top to bottom on the navbar...but on the others(Eg: FACILITIES SERVICES) the color has full effect.
HTML
<nav class="navbar">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav" style="padding-top:10px">
<li><span class="details"><strong>Phone</strong> </span><span class="contacts">021 913 0643</span></li>
<br/>
<span class="details"><strong>Email</strong> </span> <a class="contacts" href="#">info#acaciahouse.co.za </a>
</ul>
<ul class="nav navbar-nav navbar-right">
<li class="active"><span ></span>Home</li>
<li><a href="#"><span ></span> FACILITIES<br/>
SERVICES</a></li>
<li>BEDROOMS</li>
<li><a href="#">RATEs <br/>
& BOOKINGS</a></li>
<li><a href="#">SURROUNDING<br/>
ATTRACTIONS</a></li>
<li>CONTACT US</li>
</ul>
</div>
</div>
</nav>
CSS
.navbar{
padding: 0 px;
background: #331a00;
padding-left:12px;
padding-right: 12px;
border: 0px;
}
.navbar ul.navbar-right li a{
color: #ffffff;
text-align: center;
text-decoration: none;
text-transform: uppercase;
padding-top: 30px;
padding-bottom: 20px;
margin:0;
text-align: center;
}
.navbar ul.navbar-right li a:hover{
background:#000000;
}
Check fiddle here

I have to used min-height: 90px; to .navbar-nav.navbar-right li and display property for .navbar-nav.navbar-right li and .navbar-nav.navbar-right li a.
To make text vertically middle use below css.
Updated CSS
.navbar{
background: #331a00;
}
.navbar ul li a{
color: #ffffff !important;
text-transform: uppercase;
}
.navbar .navbar-default {
background:none;
border:0;
}
.navbar ul.navbar-right li a:hover{
background:#000000;
}
#media (min-width: 768px){
.navbar ul li a{
text-align:center;
}
.navbar-nav.navbar-right li{
display:table;
min-height:90px;
}
.navbar-nav.navbar-right li a{
display:table-cell;
vertical-align: middle;
}
}
#media (max-width: 767px){
.navbar-nav.navbar-right li{
display:table;
width:100%;
min-height:60px;
}
.navbar-collapse{
max-height: inherit;
}
.navbar-nav.navbar-right li a{
display:table-cell;
vertical-align: middle;
}
}
Check Updated Fiddle

Surely this CSS code works perfectly:
#import url('http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css');
.navbar{
background: #331a00;
}
.navbar ul li a{
color: #ffffff !important;
text-transform: uppercase;
}
.navbar .navbar-default {
background:none;
border:0;
}
.navbar ul.navbar-right li a:hover{
background:#000000;
}
#media (min-width: 768px){
.navbar ul li a{
text-align:center;
}
.navbar-nav.navbar-right li{
display:table;
min-height:90px;
}
.navbar-nav.navbar-right li a{
display:table-cell;
vertical-align: middle;
}
}
#media (max-width: 767px){
.navbar-nav.navbar-right li{
display:table;
width:100%;
min-height:60px;
}
.navbar-collapse{
max-height: inherit;
}
.navbar-nav.navbar-right li a{
display:table-cell;
vertical-align: middle;
}
}

Related

Customize Navbar Collapse button

How can i change the color of the collapse button there? and the white lines like the divider. here is the picture. Can someone help me? im new to css,bootstrap and html so please help me. or give me some ideas.
Here is my code.
<nav class ="navbar navbar-default" role= "navigation">
<div class = "container">
<div class ="navbar-header">
<button type ="button" class="navbar-toggle" data-toggle="collapse" data-target="#nav-collapse">
<span class="icon-bar" ></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="nav-collapse">
<ul class="nav navbar-nav">
<li class="active">Students</li>
<li class="nav-divider"></li>
<li>Faculty</li>
<li class="nav-divider"></li>
<li>About us</li>
<li class="nav-divider"></li>
<li>Contact us</li>
<li class="nav-divider"></li>
</ul>
</div>
</div>
</nav>
Here is my css.
#fot{ position:fixed;
bottom:0;
}
.navbar-default{
background-color:rgb(193,57,45);
}
.navbar .nav > li > a{
color:#ffe6e6;
}
.navbar .nav > li > a:hover{
color:#000000;
}
.navbar .nav .active > a{
background-color:rgb(193,57,45);
color:#000000;
}
.navbar .nav .active > a:hover{
background:none;
color:#fff;
}
.nav .nav-divider{
height: 50px;
margin: 0 10px;
border-right: 1px solid #a92419;
border-left: 1px solid #c1392d;
}
#media(max-width: 768px)
{.nav .nav-divider{
height: 1px;
margin: 0 10px;
background-color:#a92419;
}
.navbar-default .navbar-toggle .icon-bar {
background-color: #fff;
margin:0 0 4px;
width: 25px;
height: 5px;
}
I guess this is what you are looking for:
.icon-bar
{
background:green !important; /*Whatever colour you want for icon lines*/
}
.navbar-toggle
{
background:yellow !important; /*Whatever colour you want for background */
}
In the CSS !important forces to apply property aside it over actual properties of Bootstrap CSS.
Update: In your CSS ADD Following code:
.navbar-default .navbar-collapse, .navbar-default .navbar-form {
border-color: darkblue; /* Whatever Colour you want */
}
Yes ofcourse...just define some css on button class like this
CSS
button.navbar-toggle{
background:none;
border:none;
color:#000;
// and so on according to what style u want...
}
button.navbar-toggle span{
background:#000;/*change accordingly*/
// these span are for white line you can edit the lines in this css
}

Customized Bootstrap Navbar Responsive Problems

I have created a vertical navbar that has issues with the toggle feature when becoming a horizontal bar on a mobile device. I've tried to get around it several times, and I've ended up creating a separate style sheet for the mobile version. However, now it interferes with desktop version, and if I try to hide the mobile version, the toggle feature stops working.
I'm sure there must be an easier way to do this, but I haven't found anything that's worked.
HTML
Toggle navigation
KEDEV
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse-ex1-collapse" id="navbar-collapse-ex1-collapse">
<ul class="nav navbar-nav-mobile">
<li>
<img class="icon" src="home.png">
</li>
<li>
<img class="icon" src="services.png">
</li>
<li>
<img class="icon" src="portfolio.png">
</li>
<li>
<img class="icon" src="contact.png">
</li>
</ul>
<ul class="nav navbar-nav social">
<li>
<img class="iconSO" src="twitter.png">
</li>
<li>
<img class="iconSO" src="linkedin.png">
</li>
<li>
<img class="iconSO" src="blogspot.png">
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<!-- End Mobile Nav -->
<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-right" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#about">KEDEV</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="navbar-collapse">
<ul class="nav navbar-nav">
<li>
<a mouseover="buttonPress('1') class="menu-button" id="aboutButton" data-toggle="tooltip" data-placement="right" title="About" href="#about"><img class="icon" src="home.png"></a>
</li>
<li>
<img class="icon" src="services.png">
</li>
<li>
<img class="icon" src="portfolio.png">
</li>
<li>
<img class="icon" src="contact.png">
</li>
</ul>
<ul class="nav navbar-nav social">
<li>
<img class="iconSO" src="twitter.png">
</li>
<li>
<img class="iconSO" src="linkedin.png">
</li>
<li>
<img class="iconSO" src="blogspot.png">
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
CSS
/* MobileNav*/
.navbar-mobile {
display:none;
}
.mnavbar-header{
display:none;
}
.navbar-fixed-top{
display:none!important;
}
/*Navigation*/
.container {
width:100%;
margin:0 auto;
padding:0;
border-sizing:border-box;
}
.navbar {
margin-bottom:0;
z-index:31;
position:fixed;
float:none;
display:block;
}
.navbar-collapse {
height: 100%;
border-top: 0;
box-shadow: none;
max-height: none;
padding-left:0;
padding-right:0;
float:none;
display:block;
}
.navbar-collapse.collapse {
display: block !important;
width:100%;
overflow: visible !important;
margin-bottom:0px;
}
.navbar-collapse.in {
overflow-x: visible;
}
.navbar-nav,
.navbar-nav > li,
.navbar-left,
.navbar-right,
.navbar-header
{float:none !important;
left:0;right:auto;}
.navbar-collapse .navbar-nav.navbar-right:last-child {
margin-right: 0;
}
.navbar-brand {
color:white;
margin-bottom: 6em;
font-size:2em;
}
.navbar li {
margin: 0.5em 0.5em 0.5em 0.5em ;
position:relative;
}
.icon {
width:2em;
height:2em;
}
.social {
margin-top:20em;
}
.social li {
display:inline-block;
margin: -1em -1.3em -2em -1.1em ;
}
.iconSO {
width:2.3em;
height:2.3em;
}
/* Media Query */
#media (max-width: 767px) {
.navbar {
display:none;
}
.navbar-mobile {
display:block !important;
height:auto;
width:auto;
}
.mnavbar-header{
display:block!important;
overflow:visible;
}
.navbar-fixed-top {
display:block !important;
overflow:visible;
}
.navbar-collapse-ex1-collapse {
background-color: rgba(0, 0, 0, 0.6) !important;
float: left;
margin-top: 0;
margin-bottom: 0;
}
#navbar-collapse-ex1-collapse {
position:fixed;
left:0;
width:100%;
height:100%;
overflow:visible;
display:block ;
}
.nav-collapse.collapse-ex1-collapse {
display: block !important;
height: auto !important;
overflow: hidden !important;
}
.navbar-brand {
margin-bottom:0;
display:block;
}
.navbar li {
font-size:2em;
text-align:center;
display:inline;
}
body {
padding-left: 0;
padding-right: 0;
}
}
Here, This should do the trick.
#media (max-width: 1992px) {
.navbar-header {
float: none;
}
.navbar-left,.navbar-right {
float: none !important;
}
.navbar-toggle {
display: block;
}
.navbar-collapse {
border-top: 1px solid transparent;
box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}
.navbar-fixed-top {
top: 0;
border-width: 0 0 1px;
}
.navbar-collapse.collapse {
display: none!important;
}
.navbar-nav {
float: none!important;
margin-top: 7.5px;
}
.navbar-nav>li {
float: none;
}
.navbar-nav>li>a {
padding-top: 10px;
padding-bottom: 10px;
}
.collapse.in{
display:block !important;
}
}
Thank you for your suggestions. I have worked with it a few more hours and found an answer.
I deleted quite a bit of my media query CSS and added an overflow:hidden to my .navbar-mobile.
#media (max-width: 767px) {
.navbar-mobile {
display:block !important;
height:auto;
width:auto;
background-color: rgba(0, 0, 0, 0.6) !important;
overflow:hidden;
}
.mnavbar-header{
display:block!important;
}
.navbar-collapse-ex1-collapse {
float: left;
margin-top: 0;
margin-bottom: 0;
}
#navbar-collapse-ex1-collapse {
left:0;
width:100%;
height:100%;
display:block ;
}
.nav-collapse.collapse-ex1-collapse {
display: block !important;
height: auto !important;
}
.collapse.navbar-collapse-ex1-collapse {
background-color: rgba(0, 0, 0, 0,1) !important;
}
.navbar-brand {
margin-bottom:0;
display:block;
}
.navbar li {
font-size:2em;
text-align:center;
display:inline;
}
.navbar-collapse-ex1-collapse {
display:block;
}
}
I'm still working on tweaking the transparency and background, but now the toggle works!

btn-navbar never displays when screen width shrinks

I'm trying to create a responsive nav-bar but for some reason the btn-bav bar never displays on the site when the navbar collpases here is my html code for the nav-bar
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="index.html">Site Name</a>
<div class="nav-collapse">
<ul class="nav">
<li class="active"><i class="icon-home">Home</i></li>
<li><i class="icon-film">Film/TV</i></li>
<li><i class="icon-linux">Linux</i></li>
</ul>
<ul class="nav">
<li class="dropdown">
<i class="icon-terminal">Coding</i><b class="caret"></b>
<ul class="dropdown-menu">
<li>JavaScript/Jquery</li>
<li>Link 2</li>
<li>Link 3</li>
</ul>
</li>
</ul>
<form class="navbar-search">
<input type="text" class="search-query" placeholder="Search">
</form>
</div><!--/.nav-collapse -->
</div>
</div>
</div><!--/.end of navbar -->
Why is it that
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
doesn't display when the screen size shrinks below 940px.
Here is the realvent css
#media (max-width:979px) {
body {
padding-top:0;
}
.navbar-fixed-top {
position:static;
margin-bottom:18px;
}
.navbar-fixed-top .navbar-inner {
padding:5px;
}
.navbar .container {
width:auto;
padding:0;
}
.navbar .brand {
padding-left:10px;
padding-right:10px;
margin:0 0 0 -5px;
}
.navbar .nav-collapse {
clear:left;
}
.navbar .nav {
float:none;
margin:0 0 9px;
}
.navbar .nav>li {
float:none;
}
.navbar .nav>li>a {
margin-bottom:2px;
}
.navbar .nav>.divider-vertical {
display:none;
}
.navbar .nav .nav-header {
color:#999999;
text-shadow:none;
}
.navbar .nav>li>a,.navbar .dropdown-menu a {
padding:6px 15px;
font-weight:bold;
color:#999999;
-webkit-border-radius:3px;
-moz-border-radius:3px;
border-radius:3px;
}
.navbar .dropdown-menu li+li a {
margin-bottom:2px;
}
.navbar .nav>li>a:hover,.navbar .dropdown-menu a:hover {
background-color:#222222;
}
.navbar .dropdown-menu {
position:static;
top:auto;
left:auto;
float:none;
display:block;
max-width:none;
margin:0 15px;
padding:0;
background-color:transparent;
border:none;
-webkit-border-radius:0;
-moz-border-radius:0;
border-radius:0;
-webkit-box-shadow:none;
-moz-box-shadow:none;
box-shadow:none;
}
.navbar .dropdown-menu:before,.navbar .dropdown-menu:after {
display:none;
}
.navbar .dropdown-menu .divider {
display:none;
}
.navbar-form,.navbar-search {
float:none;
padding:9px 15px;
margin:9px 0;
border-top:1px solid #222222;
border-bottom:1px solid #222222;
-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);
-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);
box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);
}
.navbar .nav.pull-right {
float:none;
margin-left:0;
}
.navbar-static .navbar-inner {
padding-left:10px;
padding-right:10px;
}
.btn-navbar {
display:block;
}
.nav-collapse {
overflow:hidden;
height:0;
}
}
#media (min-width:980px) {
.nav-collapse.collapse {
height:auto !important;
overflow:visible !important;
}
}
Here is the jsfiddle
http://jsfiddle.net/hZktq/
The problem is somewhere on your css. I took your jsfiddle, deleted your css code and added the bootstrap cdn (https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css)
This is the result: http://jsfiddle.net/rCAQH/1/

Inline unordered list isn't centering properly

I have a super simple site, here that uses a sticky nav bar. The list items are a couple of spots off to the left and I can't figure out why. I've tinkered with all the margins and padding I can think of, but it won't budge. I should also point out that I'm using Bootstrap.
Here is my HTML:
<div id="nav-wrapper">
<div id="nav" class="navbar navbar-inverse affix-top" data-spy="affix">
<div class="navbar-inner" data-spy="affix-top">
<div class="container">
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<!-- Everything you want hidden at 940px or less, place within here -->
<div class="nav-collapse collapse">
<ul class="nav">
<li>Home</li>
<li>Services</li>
<li>Contact</li>
</ul><!--/.nav-->
</div><!--/.nav-collapse collapse pull-right-->
</div><!--/.container-->
</div><!--/.navbar-inner-->
</div><!--/#nav /.navbar navbar-inverse-->
</div><!--/#nav-wrapper-->
And here is my CSS that relates to my navigation:
.navbar {
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
padding:0;
z-index:999;
margin-bottom:0;
}
.navbar.navbar-inverse .navbar-inner {
background: #390 url(../img/green-bg.png) repeat;
border:none;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
margin-bottom:0;
}
.navbar .nav, .navbar .nav > li {
float:none;
display:inline-block;
*display:inline; /* ie7 fix */
*zoom:1; /* hasLayout ie7 trigger */
vertical-align: top;
padding:0 2em;
margin:0;
}
.navbar-inner {
text-align:center;
margin-bottom:0;
}
.navbar-inner ul.nav li {
text-align: center;
}
.navbar .nav > li a{
color:white;
background:rgba(0,0,0,0.2);
text-shadow:none;
font-size:1.5em;
font-family: marvel, serif;
padding:.5em 1em;
margin:.5em 1em;
}
.navbar .nav > .active a:hover, .navbar .nav > li a:hover, .navbar .nav > .active a {
color:white;
background: #390 url(../img/green-bg.png) repeat;
text-shadow:none;
font-size:1.5em;
font-family: marvel, serif;
padding:.5em 1em;
margin:.5em 1em;
-webkit-box-shadow: inset 0 0 10px #000;
-moz-box-shadow: inset 0 0 10px #000;
box-shadow: inset 0 0 10px #000;
}
.navbar .nav > li {
padding:1em;
margin:0;
}
#nav.affix, #nav.affix-bottom {
position: fixed;
top: 0;
width: 100%
}
#nav {
position:relative;
z-index:999;
-webkit-perspective: 1000; -webkit-backface-visibility: hidden;
}
I know it's a minor detail, but I've been trying to fix it for days now and can't figure out why it's being a pain.
Thanks for your help,
Brian
You have a right margin of 10px on the .navbar .nav(bootstrap.min.css:9) which pushes it a bit to the left.
Change this:
.navbar .nav {
display:block;
float:left;
left:0;
margin:0 10px 0 0;
position:relative;
}
to this:
.navbar .nav {
display:block;
float:left;
left:0;
margin:0;
position:relative;
}
The good news, is here is how to center the list items:
Add a class called ".center" like so:
<div class="navbar navbar-fixed-top center">
<div class="navbar-inner">
....
</div>
</div>
And then use this CSS:
.center.navbar .nav,
.center.navbar .nav > li {
float:none;
display:inline-block;
*display:inline; /* ie7 fix */
*zoom:1; /* hasLayout ie7 trigger */
vertical-align: top;
}
.center .navbar-inner {
text-align:center;
}
To realign the drop down menus, use this:
.center .dropdown-menu {
text-align: left;
}
This was taken from a previous answer.
Now, the bad news, is that solution also centers the menu items on the mobile-menu drop down for tablet and mobile viewports. I literally just posted a question on there ten minutes ago here:
How to Override/Undo CSS Class Attributes for Twitter Bootstrap
If you find a solution, please let me know because we are both asking the same question!

Menu with 2 levels disapear the background

and girls!
i have make a CSS menu, with 2 sub-level. The second level works properly. But when some of these second level menu has a sub-menu, the background of this disapear....
Here is working example with the problem
If you go to the menu: "PARA VOCÊ" and hover "LINHAS DE CRÉDITO" you see the problem...
this is my HTML Code:
<div id="menu_principal" class="wrap">
<div class="inner clearfix">
<ul id="ja-cssmenu" class="clearfix topnav">
<li class="active">
<a href="http://www.sicoobes.net/" class="menu-item0 active first-item" id="menu1" title="Principal">
<span class="menu-title">PRINCIPAL</span>
</a>
</li>
<li class="havechildmenu-item1">
<a href="/index.php/o-sicoob" class="menu-item1 haschild" id="menu54" title="O Sicoob">
<span class="menu-title">O SICOOB</span>
</a>
<ul class="subnav">
<li>Institucional</li>
<li>Equipe
<ul class="sub_subnav">
<li>Conselho Administrativo</li>
<li>Diretoria Executiva</li>
<li>Conselho Fiscal</li>
</ul>
</li>
<li>Código de Ética</li>
<li>Demonstrações</li>
<li>Estatuto</li>
<li>Políticas</li>
<li>Regimentos</li>
</ul>
</li>
<li class="havechildmenu-item1">
<a href="/index.php/o-sicoob" class="menu-item1 haschild" id="menu54" title="O Sicoob">
<span class="menu-title">PARA VOCÊ</span>
</a>
<ul class="subnav">
<li>Conta Corrente</li>
<li>Linhas de Crédito
<ul class="sub_subnav">
<li>Financiamento Veículos e outros</li>
<li>Credito Retorno Parcelado</li>
</ul>
</li>
<li>Seguros
<ul class="sub_subnav">
<li>Vida</li>
<li>Automóvel</li>
<li>Residencial</li>
<li>Vida Mulher</li>
</ul>
</li>
<li>Soluções de Investimentos
<ul class="sub_subnav">
<li>Fundos de investimento (liquidez diária).</li>
</ul>
</li>
</ul>
</li>
<li class="havechildmenu-item1">
<a href="/index.php/o-sicoob" class="menu-item1 haschild" id="menu54" title="O Sicoob">
<span class="menu-title">PARA SUA EMPRESA</span>
</a>
</li>
</ul>
</div>
</div>
and now, the CSS:
#menu_principal{
bottom:0;
position:relative;
margin:0 auto;
width:980px;
height:35px;
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
background-image:url(imagens/menu_bg.gif);
background-position:50% 0;
background-repeat:no-repeat no-repeat;
}
.wrap {
clear:both;
width:100%;
}
.clearfix{
display:block;
}
ul.topnav {
float:left;
margin:0;
padding:0;
}
ul.topnav {
list-style-image:initial;
list-style-position:initial;
list-style-type:none;
}
ul.topnav li {
background-image:url(imagens/sep.gif);
background-position:100% 0;
background-repeat:no-repeat no-repeat;
cursor:pointer;
display:block;
float:left;
height:35px;
margin:0;
padding:0;
cursor:pointer;
}
ul.topnav li a {
color:#FFFFFF;
display:block;
font-family:'Trebuchet MS', Arial, Helvetica, sans-serif;
font-weight:bold;
height:35px;
margin:0;
padding-bottom:0;
padding-left:15px;
padding-right:15px;
padding-top:0;
text-decoration:none;
text-transform:uppercase;
}
ul.topnav span.menu-title {
text-shadow:#111111 0 1px 0;
}
ul.topnav span.menu-title {
display:block;
font-size:110%;
padding-top:8px;
}
ul.topnav li a.first-item {
border-left-color:initial;
border-left-style:initial;
border-left-width:0;
}
ul.topnav li:hover, ul.topnav li a.active{
background-image:url(imagens/bg_itens_menu.gif);
background-position:-15px -48px;
}
ul.topnav li a.active.first-item {
background-position:-403px -48px;
}
ul.topnav li ul.subnav {
list-style: none;
background: #333;
margin: 0; padding: 0;
display: none;
width: 200px;
border: 1px solid #111;
position: absolute;
}
ul.topnav li:hover ul.subnav{
display: block;
padding: 0;
width: 200px;
}
ul.topnav li ul.subnav li{
margin: 0; padding:0;
border-top: 1px solid #252525;
border-bottom: 1px solid #444;
width: 200px;
}
ul.topnav li ul.subnav li a{
margin-top:8px;
color: #fff;
height:35px;
}
ul.topnav li ul.subnav li:hover{
text-shadow:#111111 0 1px 0;
}
ul.topnav li ul.subnav li ul.sub_subnav{
list-style: none;
left:201px;
top:-45px;
margin:0;
padding:0;
display:none;
width:300px;
border:1px solid #111;
background-color: #333333;
position:relative;
}
ul.topnav li ul.subnav li:hover ul.sub_subnav{
display: block;
}
ul.topnav li ul.subnav li ul.sub_subnav li{
margin: 0; padding:0;
border-top: 1px solid #252525;
border-bottom: 1px solid #444;
width: 300px;
}
thanks for help!
Remove float from your .sub_subnav li. Write like this:
ul.topnav li ul.subnav li ul.sub_subnav li {
float: none;
}
OR
you can write like this:
ul.topnav > li{
float:left;
}
You have a float set to left on ul.topnav li, this should be set only on ul.topnav > li
PS : you don't need subnav or sub_subnav classes since you can use css selectors to handle this