CSS/HTML: How to make dropdown menu work - html

I am making a test site, and I made it with no drop down menu. It looks like this: http://wrzuc.se/images/52c72647ec30e.png
My Site: http://crafted2.ugu.pl/cn2/
But, now I want to add simple drop down to "serwery". What's wrong in my code ?
HTML:
<!-- MENU CRAFTED NETWORK --->
<div class="menu">
<div id="nav">
<img class="steve" src="images/steve.png"/>
<ul>
<li>STRONA GŁÓWNA</li>
<li><img style="splitter" src="/CN/images/nav_splitter.png"></li>
<li>SERWERY
<ul>
<li><i class="icon-chevron-right"></i>Official Survival Games</li>
<li><i class="icon-chevron-right"></i>Trouble in Mineville</li>
<li><i class="icon-chevron-right"></i>The Herobrine</li>
<li><i class="icon-chevron-right"></i>Hide and Seek</li>
<li><i class="icon-chevron-right"></i>Splegg</li>
<li><i class="icon-chevron-right"></i>One In The Chamber</li>
</ul>
</li>
<li><img style="splitter" src="/CN/images/nav_splitter.png"></li>
<li>FORUM</li>
<li><img src="/CN/images/nav_splitter.png"></li>
<li>SKLEP SMS</li>
<li><img src="/CN/images/nav_splitter.png"></li>
<li>FAQ</li>
</ul>
</div>
<div class="ip"><p>IP: CRAFTED.PL</p></div>
<div class="statystyki">
<p>DOŁĄCZ DO <b>1267</b> GRACZY ONLINE!</p>
<img src="images/email.png" alt="">
<img src="images/youtube.png" alt="">
<img src="images/facebook.png" alt="">
</div><!-- KONIEC MENU -->
CSS:
.menu {
padding: 0;
margin: 0;
border: 0;
height: 132px;
position:absolute;
top: 320px;
background: url(../images/menu.png) repeat-x;
width: 100%;
}
#navi select {
display:none;
padding:4px 8px;
border: 1px dotted #CCC;
margin:3px 0px 5px 0px;
font-family: Crafted;
color: #807f7f;
font-size:10pt;
font-weight:normal;
text-decoration:none;
}
.ip {background:url('../images/ip.png') no-repeat;margin:11px 0 0 0;width:215px;height:50px;float:right;}
.ip p{font-family:Crafted;font-size:31px;color:#fff;text-align:center;width:100%;height:30px;margin:1px 0 0 0;float:left;padding-left:15px;}
.statystyki p{font-family:Crafted;font-size:40px;color:#fff;width:100%;height:30px;margin:10px 0 0 0;float:left;padding-left:70px;}
.social2 {margin: -40px 0 0 0;float: right;position: relative;width: auto;height: auto;}
.social2:hover{opacity:0.8;}
.social {margin: -40px 0 0 0;float: right;margin-right: 60px;position: relative;width: auto;height: auto;}
.social:hover{opacity:0.8;}
.steve {
margin: -79px 0 0 0;
background: url(../images/steve.png) repeat-x;
position: absolute;
margin-left: 700px;
float: left;
}
#navi {
float:left;
padding-left: 60px;
}
#navi ul {
float:left;
padding:0px;
margin:0px;
}
#navi ul li {
float:left;
top: 10px;
display:inline-block;
padding:12px 12px 13px 12px;
list-style-type: none;
position:relative;
}
#navi ul li:first-child{
float:left;
display:inline-block;
padding:12px 12px 13px 12px;
list-style-type: none;
position:relative;
}
#navi ul li a, #navi ul li a:visited{
font-family: Crafted;
color: #044B55;
font-size:22px;
font-weight:normal;
text-decoration:none;
}
#navi ul li a:hover{
font-family: 'Crafted',Arial, Helvetica, sans-serif;
color: #006775;
font-weight:normal;
text-decoration:none;
}
#navi ul li ul{
position:absolute;
display: none;
z-index: 2000;
padding-top:13px;
margin-left:-13px;
background-color:white;
}
#navi ul ul li {
float: none;
border-top: 1px solid #6b727c;
border-bottom: 1px solid #575f6a;
position: relative;
}
#navi ul ul li a {
padding: 15px 40px;
color: #fff;
}
I was getting code to make dropdown from: www.threestyles.com/tutorials/css-drop-down-navigation-tutorial/
Please help me to make it work, and look like my old picture.

Your id is nav and not #navi, right?
display:none to the dropdown menu (as you have it) and then, add a class here in the "serwery" li:
<li class="serwery">SERWERY
Then you display: block the secondary menu on hover:
.serwery:hover > ul {
display: block;
position: absolute;
...
}

Related

Dropdown Menu not showing? White space showing on right side when set to overflow:visible

I'm putting up a site on Tumblr for my online store. Thing is, I can't get the dropdown menu to show up when I put "overflow:hidden" on the #topmenu part. When I set it to "overflow:visible", I get a huge chunk of white space to the right of the webpage. The white space isn't obvious when I'm using my laptop but it is when I use my phone.
I've tried changing the value of the z-index but it still won't work. I want to be able to have "overflow:visible" while not getting the white space at the right side of the page.
Please help me figure out what's wrong with the code and find a solution. I think there's something wrong with the width of the menu. But then when I change the width, all the links are pushed to the left side of the page.
Thank you in advance!
#topmenu {
font-family: 'Montserrat', sans-serif;
float:left;
width:100%;
background:transparent;
overflow:visible;
z-index:99999;
position:relative;
}
#topmenu ul {
clear:left;
float:left;
list-style:none;
margin:0;
padding:0;
position:relative;
left:50%;
text-align:center;
}
#topmenu ul li {
display:block;
float:left;
list-style:none;
margin:0;
padding:3pt;
position:relative;
right:50%;
}
#topmenu ul li a {
display:block;
margin:0 0 0 1px;
padding:4px 11px;
background: transparent;
color: #222222;
font-size:10px;
text-decoration:none;
line-height:2em;
letter-spacing: 3px;
}
#topmenu ul li a:hover {
background: none;
color: #b492a8;
}
#topmenu ul li ul.dropdown{
min-width: 125px;
max-width: 125px;
background: #ffffff;
display: none;
position: absolute;
z-index: 999;
left: 0;
}
#topmenu ul li:hover ul.dropdown{
display: block; /* Display the dropdown */
padding:0px 0px 0px 50px;
}
#topmenu ul li ul.dropdown li{
display: block;
}
<div id="topmenu">
<ul>
<li>HOME</li>
<li>SHOP</li>
<li>FAQ</li>
<li>ORDER FORM</li>
<li>CUSTOMERS
<ul class="dropdown">
<li>OOTD</li>
<li>Feedbacks</li>
</ul>
</li>
<li>ABOUT</li>
</ul>
</div>
EDIT:
I tried using #gopalraju's code and it eliminated the white space while showing the dropdown menu. (Thank you gopalraju!)
How do I push the whole menu to the center of the page?
And how do I put the dropdown menu right under the word "Customers"?
#topmenu {
font-family: 'Montserrat', sans-serif;
float:left;
width:100%;
background:transparent;
overflow:visible;
z-index:99999;
position:relative;
}
#topmenu ul {
clear:left;
list-style:none;
margin:0;
padding:0;
position:relative;
display:table;
margin:0 auto;
text-align:center;
}
#topmenu ul li {
display:block;
float:left;
list-style:none;
margin:0;
padding:3pt;
position:relative;
}
#topmenu ul li a {
display:block;
margin:0 0 0 1px;
padding:4px 11px;
background: transparent;
color: #222222;
font-size:10px;
text-decoration:none;
line-height:2em;
letter-spacing: 3px;
}
#topmenu ul li a:hover {
background: none;
color: #b492a8;
}
#topmenu ul li ul.dropdown{
min-width: 125px;
max-width: 125px;
background: #ffffff;
display: none;
position: absolute;
z-index: 999;
left: 0;
}
#topmenu ul li:hover ul.dropdown{
display: block; /* Display the dropdown */
}
#topmenu ul li ul.dropdown li{
display: block;
}
<div id="topmenu">
<ul>
<li>HOME</li>
<li>SHOP</li>
<li>FAQ</li>
<li>ORDER FORM</li>
<li>CUSTOMERS
<ul class="dropdown">
<li>OOTD</li>
<li>Feedbacks</li>
</ul>
</li>
<li>ABOUT</li>
</ul>
</div>

How can I make my horizontal navigation bar a drop down menu?

I've tried making horizontal drop down navigation bars following tutorials, however they are never centered and I can't figure out how to center them. I tried going in the opposite direction and centering my navigation bar first, and then attempting to make it a drop down menu, though this seems to throw everything off. This is the code I have.
EDIT: The problem I am having is that the submenu is displayed when the page is loaded, along with a bullet point, which I'm sure can be fixed by setting the list-style to none, however I'm not sure where in the CSS this should be.
I'm trying to create a menu similar to THIS. I understand this uses joomla and I am not.
#header {
height: 100px;
margin-left: auto;
margin-right: auto;
text-align: center;
}
#content {
max-width: 700px;
margin-left: auto;
margin-right: auto;
padding: 20px;
}
#footer {
height: 85px;
padding-top: 40px;
margin-left: auto;
margin-right: auto;
text-align: center;
}
#menu {
margin: 0 auto;
display: inline-block;
list-style: none;
padding: 0;
border-top: 1 solid #ccc;
border-left: 1 solid #ccc;
border-bottom: 1 solid #ccc;
}
#menu li {
float: left;
}
#menu li a {
display: block;
padding: 10px 10px;
text-decoration: none;
font-weight: bold;
}
#menu li a:hover {
color: #c00;
}
<ul id="menu">
<li>Home
</li>
<li>Kandi
<ul>
<li>Claim Kandi
</li>
</li>
<li>Events
</li>
<li>Artists
</li>
<li>Community
</li>
<li>Merchandise
</li>
</ul>
Add this CSS:
#menu, #menu ul {
margin:0 auto;
padding:0;
}
#menu li {
float: left;
position: relative;
list-style: none;
}
#menu > li:hover > ul {
display: block;
}
#menu > li > ul {
display: none;
position: absolute;
}
#menu li a {
white-space: nowrap;
}
http://jsfiddle.net/tcKvH/1/
use this css
#menu{
position:absolute;
top:150px;
left:8%;
padding:0;
margin:0;
}
#menu ul{
padding:0;
margin:0;
line-height:30px;
}
#menu li{
position:relative;
float:left;
list-style:none;
background:rgba(0,0,0,1);
border-radius:5px;
}
#menu ul ul{
position:absolute;
visibility:hidden;
padding:0;
margin:0;
top:30px;
}
#menu ul li a{
text-align:center;
font:"Arial Black", Arial;
font-size:24px;
color:rgba(255,255,255,9);
width:150px;
height:30px;
display:block;
text-decoration:none;
}
#menu ul li:hover{
background-color:rgba(128,128,128,1);
text-decoration:none;
}
#menu ul li:hover ul{
visibility:visible;
z-index:1;
}
#menu ul li:hover ul li a{
background:rgba(0,0,0,9);
z-index:1;
border-bottom:1px solid rgba(160,160,164,1);
opacity:0.9;
text-decoration:none;
border-radius:5px;
}
#menu ul li ul li:hover{
background:rgba(128,128,128,1);
opacity:0.8;
text-decoration:underline;
}
with this html code
<div id="menu">
<ul>
<li>Home</li></ul>
<ul>
<li>Video <!--This is in main menu-->
<ul>
<li>Technology</li> <!--This is in drop downmenu-->
<li>Tutorial</li> <!--This is in drop downmenu-->
</ul>
</li>
</ul>

Can't put these buttons at the bottom

I am having problems trying to put these buttons at the bottom rather rather than at the middle. I have searched through the internet, tried many things and still doesn't work.
Here's a snippit of my HTML Code:
<table class="table">
<tr>
<td class = "td"><img class = "logo" src="images/CoffeeLogo.jpg"></td>
<td>
<ul>
<li><a class = "bt" href="#home">Home</a></li>
<li>About</li>
<li>Menu</li>
<li>Sign up</li>
<li>extra</li>
</ul>
</td>
</tr>
</table>
And here's my CSS Code for the buttons:
ul
{
list-style-type:none;
padding:0;
overflow:hidden;
float: bottom;
margin-bottom: -10;
}
li
{
float:left;
}
a:link,a:visited
{
display:block;
height: 18px;
width:122px;
color:#FFFFFF;
background-color:#ca3838;
text-align:center;
padding:4px;
text-decoration:none;
text-transform:uppercase;
font-family: "Gill Sans MT";
font-size: 13.5pt;
}
a:hover,a:active
{
background-color: #FF8080;
}
.table, .td, .th
{
border-collapse:collapse;
moz-box-shadow: 0 0 2px 2px #888;
webkit-box-shadow: 0 0 2px 2px#888;
box-shadow: 0 0 2px 2px #888;
border:0px;
border-left: 10px solid white;
margin-left: auto;
margin-right: auto;
padding: 0;
background-color: #ca3838;
}
Any suggestions?
Change your first two CSS rules to:
ul {
list-style-type:none;
padding:0;
overflow:hidden;
margin: 0;
}
li {
float:left;
padding-top:20px;
}
jsFiddle example
You had been putting a margin on your ul with no units so that was basically being ignored, but you didn't want to do it that way anyway. Instead put top padding on the li elements.
If absolutely nothing is working for you, give the body a height of 1000 or something:
body {
height:1000px;
}
make a div the height of the difference between your nav bar and the body height:
div {
height:850px
margin:auto;
}
and make sure your div is on auto margin. This should push your nav bar down to the bottom.
I hope this helps.
<style type="text/css">
ul {
list-style-type: none;
padding: 0;
overflow: hidden;
margin-bottom: 0;
}
li {
float: left;
padding-top:20px;
}
a:link, a:visited {
display: block;
height: 18px;
width: 122px;
color: #FFFFFF;
background-color: #ca3838;
text-align: center;
padding: 4px;
text-decoration: none;
text-transform: uppercase;
font-family: "Gill Sans MT";
font-size: 13.5pt;
}
a:hover, a:active {
background-color: #FF8080;
}
.table, .td, .th {
border-collapse: collapse;
moz-box-shadow: 0 0 2px 2px #888;
webkit-box-shadow: 0 0 2px 2px#888;
box-shadow: 0 0 2px 2px #888;
border: 0px;
border-left: 10px solid white;
margin-left: auto;
margin-right: auto;
padding: 0;
background-color: #ca3838;
}
</style>
float: bottom doesn't exist in CSS.
The key to putting things on the bottom in HTML layout is to first ensure that the container reaches the bottom, then either position at the bottom with absolute positioning, or make sure that the flowing content above pushes your content down.
Here's the easiest way I know to do it, assuming you want the menu to always appear at the bottom, even before scrolling, and assuming your menu is 20px tall.
HTML:
<div class="page-container">
<div class="scrolling-content">
<!-- Your other stuff here -->
</div>
<ul class="bottom-menu">
<!-- The content of your menu -->
</ul>
</div>
CSS:
html, body {
height: 100%;
}
.page-container { /* This takes up the whole window */
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
.scrolling-content {
position: absolute;
top: 0;
bottom: 20px;
left: 0;
right: 0;
overflow: auto;
}
.bottom-menu {
position: absolute;
height: 20px;;
bottom: 0;
left: 0;
right: 0;
}
Try this: http://jsfiddle.net/kuroisuna/TKY4p/1/
In your CSS:
ul {
list-style-type:none;
padding:0;
overflow:hidden;
float: bottom; /* This doesn't exist */
margin: 20px 0 4px 0;
}
li {
float:left;
margin: 0;
}
But, this will be much natural without a table: http://jsfiddle.net/kuroisuna/5heFE/2/
HTML
<ul>
<li class="logo"><img class="logo" src="images/CoffeeLogo.jpg" width="20" height="18"></li>
<li><a class="bt" href="#home">Home</a></li>
<li>About</li>
<li>Menu</li>
<li>Sign Up</li>
<li>Extra</li>
</ul>
CSS
ul {
list-style-type:none;
padding:0;
overflow:hidden;
margin: 0;
}
li {
float:left;
}
a:link, a:visited {
display:block;
width:122px;
color:#FFFFFF;
background-color:#ca3838;
text-align:center;
padding:20px 4px 4px 4px;
text-decoration:none;
text-transform:uppercase;
font-family:"Gill Sans MT";
font-size: 13.5pt;
}
a:hover, a:active {
background-color: #FF8080;
}
li.logo {
background-color:#ca3838;
padding:24px 4px 4px 4px;
}
Change on li:
remove float property
add display as inline-block
add position as relative
add bottom to -20px or so
Change on ul:
remove overflow property
You're done!
See it live in this jsFiddle.
DON'T ever use table for website layouts.use DIVES (divisions )
HTML
<div id="box">
<ul>
<li><a class="bt" href="#home">Home</a>
</li>
<li>About
</li>
<li>Menu
</li>
</ul>
</div>
CSS
#box{
background:#000;
height:200px;
position:relative;
}
ul {
position:absolute;
bottom:0;
}
li {
float:left;
margin-right:20px;
list-style-type:none;
}
a:link,a:visited
{
display:block;
height: 18px;
width:122px;
color:#FFFFFF;
background-color:#ca3838;
text-align:center;
padding:4px;
text-decoration:none;
text-transform:uppercase;
font-family: "Gill Sans MT";
font-size: 13.5pt;
}
a:hover,a:active
{
background-color: #FF8080;
}
DEMO
Something like this will be much easier to achieve: http://jsfiddle.net/C2NEY/1/
CSS:
#header {
background-color:#ca3838;
}
#nav {
width: 100%;
margin: 0;
padding: 0;
}
#nav li {
display:inline-block;
margin:0;
padding:0;
height: 25px;
width:122px;
padding:4px;
text-align:center;
}
#nav li:hover {
background-color: #FF8080;
}
#nav a {
color:#FFFFFF;
text-decoration:none;
text-transform:uppercase;
font-family:"Gill Sans MT";
font-size: 13.5pt;
}
HTML:
<div id="header">
<img class="logo" src="images/CoffeeLogo.jpg" />
<ul id="nav">
<li><a class="bt" href="#home">Home</a></li>
<li>About</li>
<li>Menu</li>
<li>Sign up</li>
<li>extra</li>
</ul>
</div>
Instead of "margin-left:auto" write "margin-left:" and the margin value like 12Px or whatever you want, and the same for margin-top:
this will position it to its right place.

CSS nav bar disappear under the other div

I have this html code
<div id="navbar">
<ul>
<li>Page1</li>
<li>page2</li>
<li id="NavItem">
page3
<div id="PopOver">Some text here<br>Some text here<br>Some text here<br>Some text here<br>Some text here<br>Some text here<br>Some text here</div>
</li>
<li>page4</li>
</ul>
</div>
<div id="banners">
<div class="wrap">
<div class="left"><img src="http://www.mountainecho.bizland.com/banex1.jpg"></div>
<div class="right"><img src="http://www.mountainecho.bizland.com/banex1.jpg"</div>
</div>
</div>
And CSS code
#navbar { position: relative; margin: 3px; }
#navbar ul { padding: 0; margin: auto; background: #f0f0f0 url(../images/1px.png) repeat-x 0 -441px; padding: 4px 0 4px 0; }
#navbar li { display: inline; margin-right: 80px; }
#navbar li a { font-family: EqualSansDemo; font-size: 1.6em; color: #555555; text-shadow: 1px 1px 0px #fff; }
#navbar li a:hover { color: #0071e4; }
#PopOver {
position:absolute;
border:2px solid #07B1F1;
width:170px;
height:auto;
padding:15px 5px 10px 5px;
display:none;
top:30px;
left:229px;
background-color:#FFFFFF;
border-radius:8px;
-moz-border-radius:8px;
-webkit-border-radius:8px;
}
#NavItem:hover #PopOver {display:block}
#banners { padding-top: 25px; padding-bottom: 25px; position: relative; }
.wrap { width: 1000px; margin: 0 auto; }
.left { float: left; }
.right { float: right; }
The problem :
In many of cases the nav bar will disappear under the other div
For example i have added "#banners" div and i think the problem because of "position: relative;"
But as i said "#banners" div is just for the example and if i need to fix this, i should in #navbar #NavItem:hover #PopOver
Any idea please ?
Thank you.
#PopOver {
position:absolute;
border:2px solid #07B1F1;
width:170px;
height:auto;
padding:15px 5px 10px 5px;
display:none;
top:30px;
left:229px;
background-color:#FFFFFF;
border-radius:8px;
-moz-border-radius:8px;
-webkit-border-radius:8px;
z-index:1;
}
Set z-index:2; or greater in #PopOver
Set a z-index value on the #navbar item. http://www.w3schools.com/cssref/pr_pos_z-index.asp

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