Mám víceúrovňové menu, ale když mu dám float:right přestanou fungovat víceúrovňové tlačítka, menu se sice zobrazí, ale když na něj najedu myší ztratí se!
CSS
.nav{
font-family: 'PT Sans', sans-serif;
box-shadow: 0 1px 6px rgba(0,0,0,0.3);
-moz-box-shadow: 0 1px 6px rgba(0,0,0,0.3);
-webkit-box-shadow: 0 1px 6px rgba(0,0,0,0.3);
text-transform: uppercase;
background-color: white;
width: 100%;
height:70px;
padding: 0;
line-height: 70px;
vertical-align: middle;
}
.nav ul {
float: right;;
list-style: none;
text-align: center;
padding: 0;
margin: 0;
}
.nav > ul > li {
width: 120px;
border-bottom: none;
height: inherit;
font-size: 1.4em;
display: inline-block;
font-family: 'Oswald', sans-serif;
font-size: 1.2em;
}
.nav a {
text-decoration: none;
color: black;
display: block;
transition: .3s background-color;
}
.nav > ul > li:hover {
float:none;
clear:both;
background-color: #005f5f;
border-bottom: 5px solid #ff0000;
}
.nav > ul > li > ul{
display: none;
position: absolute;
width: 100px;
}
.nav > ul > li:hover > ul{
display: block;
}
HTML
<nav class="nav">
<ul>
<li class="<?php if($currentURL==="$root/test.php") echo "header-active"?>"><a href=<?php echo "$root/Index.php";?>>ÚVOD</a></li>
<li class="<?php if($currentURL==="$root/test.php") echo "header-active"?>">
<a href=<?php echo "$root/Index.php";?>>kurzy</a>
<ul>
<li ><a href="#">test</a></li>
<li ><a href="#">test</a></li>
<li ><a href="#">test</a></li>
</ul>
</li>
<li class="<?php if($currentURL==="$root/test.php") echo "header-active"?>"><a href=<?php echo "$root/Index.php";?>>ÚVOD</a></li>
<li class="<?php if($currentURL==="$root/test.php") echo "header-active"?>"><a href=<?php echo "$root/Index.php";?>>ÚVOD</a></li>
<li class="<?php if($currentURL==="$root/test.php") echo "header-active"?>"><a href=<?php echo "$root/Index.php";?>>ÚVOD</a></li>
</ul>
</nav>