September 2018 1 61 Report

mam kod mojego rozwijanego menu i jest mały problem gdzie mam wkleić CSS, żeby to działało?

<div>
<ul id="menu">
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>
<li><a href="#">Link 3</a>
<ul>
<li><a href="#">Submenu 1</a></li>
<li><a href="#">Submenu 2</a></li>
<li><a href="#">Submenu 3</a>
<ul>
<li><a href="#">Subsubmenu 1</a></li>
<li><a href="#">Subsubmenu 2</a></li>
<li><a href="#">Subsubmenu 3</a>
<ul>
<li><a href="#">Czwarty poziom</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#">Submenu 4</a></li>
</ul>
</li>
<li><a href="#">Link 4</a></li>
<li><a href="#">Link 5</a></li>
<li><a href="#">Link 6</a>
<ul>
<li><a href="#">Submenu 1</a></li>
<li><a href="#">Submenu 2</a></li>
<li><a href="#">Submenu 3</a></li>
<li><a href="#">Submenu 4</a></li>
</ul>
</li>
</ul>
</div>

i kod CSS

*{
padding:0;
margin:0;
}

body{
text-align:center;
}

div{
display:inline-block;
}

a{
display:block;
color:#fff;
text-decoration:none;
font-weight:bold;
height:20px;
padding:4px 0;
}

ul#menu{
list-style: none;
padding: 0;
margin: 0;
}

ul#menu li{
float: left;
position: relative;
width: 150px;
background-color:#000;
}

ul#menu li ul li{
position: relative;
}

ul#menu li ul{
list-style: none;
visibility:hidden;
position: absolute;
width:150px;
top: 28px;
left: 0;
}

ul#menu li ul li ul{
list-style: none;
visibility:hidden;
position: absolute;
width:150px;
top: 0;
left: 150px;
}

ul#menu li:hover{
background-color:#999;
}

ul#menu li:hover > ul{
visibility:visible !important;
}


More Questions From This User See All

Recommend Questions



Life Enjoy

" Life is not a problem to be solved but a reality to be experienced! "

Get in touch

Social

© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.