CSS Dropdown menu with images - Keep subitems from disappearing? - html

I have created a CSS dropdown menu based on four images. When I hover over the first one the three others appear using :hover on the first <li> which sets opacity of the three others to 1. However, I cannot accomplish that the three others remain present when I scroll down to them.
Here is the live site and this is the CSS and HTML:
ul {
list-style: none;
width: 200px;
padding-left: 30px;
margin: 0px;
border: none;
float: left;
margin-right: 5px;
z-index: 1;
position: relative;
}
li#dropdown {
height: 510px;
padding: 0px;
margin: 0px;
opacity: 0;
transition: all 0.5s;
}
li:hover + li#dropdown {
opacity: 1;
/* display the dropdown */
}
li#dropdown:hover li#dropdown {
opacity: 1;
/* display the dropdown */
}
<ul>
<li id="noten">
<img id="noten" src="http://www.placehold.it/100">
</li>
<li id="dropdown">
<img id="pitten" src="http://www.placehold.it/100" naptha_cursor="region">
<img id="muesli" src="http://www.placehold.it/100" naptha_cursor="text">
<img id="fruit" src="http://www.placehold.it/100" naptha_cursor="text">
</li>
</ul>

You need to place the hover state on the dropdown element using: li:hover + li#dropdown, li#dropdown:hover.
Also, here are two examples that prevent the menu being displayed unwanted when the mouse is hovered underneath your dropdown.
Working Examples
#1 - using pointer-events
Best thing - transition fade-in and fade-out
Limitation - supported in all major browsers and IE 11 - If you must have IE10 and below support, this is possible. Depending on your requirements, this may not be a limitation. Here are two questions that discuss various alternatives for IE 10 and below - Question One and Question two.
pointer-events: none on the ul prevents the dropdown activating when it is not visible. It is cancelled on hover with pointer-events: auto
Hover over the image and the images that appear underneath on hover
ul {
list-style: none;
width: 200px;
padding-left: 30px;
margin: 0px;
border: none;
float: left;
margin-right: 5px;
z-index: 1;
position: relative;
pointer-events: none;
}
li#dropdown {
height: 510px;
padding: 0px;
margin: 0px;
opacity: 0;
transition: all 0.5s;
position: absolute;
}
li#noten {
pointer-events: auto;
}
li:hover + li#dropdown, li#dropdown:hover {
opacity: 1;
pointer-events: auto;
/* display the dropdown */
}
<ul>
<li id="noten">
<img id="noten" src="http://www.placehold.it/100">
</li>
<li id="dropdown">
<img id="pitten" src="http://www.placehold.it/100" naptha_cursor="region">
<img id="muesli" src="http://www.placehold.it/100" naptha_cursor="text">
<img id="fruit" src="http://www.placehold.it/100" naptha_cursor="text">
</li>
</ul>
#2 Using translate to slide drop down up and then down on hover
Limitation - opacity does not fade out, only in
ul {
list-style: none;
width: 200px;
padding-left: 30px;
margin: 0px;
border: none;
float: left;
margin-right: 5px;
z-index: 1;
position: relative;
}
li#dropdown {
height: 510px;
padding: 0px;
margin: 0px;
opacity: 0;
transition: opacity 0.5s;
position: absolute;
transform: translateY(-100%);
}
li:hover + li#dropdown, li#dropdown:hover {
opacity: 1;
transform: translateY(0);
/* display the dropdown */
}
<ul>
<li id="noten">
<img id="noten" src="http://www.placehold.it/100">
</li>
<li id="dropdown">
<img id="pitten" src="http://www.placehold.it/100" naptha_cursor="region">
<img id="muesli" src="http://www.placehold.it/100" naptha_cursor="text">
<img id="fruit" src="http://www.placehold.it/100" naptha_cursor="text">
</li>
</ul>

Approximately so:
<div class="menu_img_container">
<img src="pic.jpg">
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
</div>
<style>
.menu_img_container
{
display: inline;
position: relative;
}
.menu_img_container ul
{
display: none;
position: absolute;
top: 50px;
left: 0;
}
.menu_img_container:hover ul
{
display: block;
}
</style>

You can prolong the hover effect using transitions http://jsfiddle.net/zn6j5xvv/
HTML
<div id="a">a
<div id="b">
<img src="http://placekitten.com/300/301"/>
</div>
CSS
#a{
width:50px;
height:50px;
background-color:green;
transition:0s 100s;
}
#b{
width:200px;
height:200px;
opacity:0;
transition:0s 100s;
}
#a:hover #b{
opacity:1;
transition:0s;
}

this should do the trick, just update these three parts of your css
li#dropdown {
height: 510px;
padding: 0px;
margin:0px;
display:none;
transition: all 0.5s;
}
li:hover + li#dropdown {
display: block; /* display the dropdown */
}
li#dropdown:hover{
display:block;
}

It's a little tricky, because you want to have a nice opacity transition. It would be much simpler with just display: none. But we can still make it work with transition if you use combination of position: absolute for hiding items and opacity for transition.
Move :hover selector from li to entire ul
ul:hover > li#dropdown {
opacity: 1;
top: auto;
}
li#dropdown {
height: 510px;
padding: 0px;
margin: 0px;
opacity: 0;
transition: all 0.5s;
position: absolute; /* move items far off the screen */
top: -1000px;
}
And it should work. So the idea is that #dropdown menu is moved outside the screen with position absolute, which make it impossible to hover over "invisible" items, so they don't appear on white area hover. However on the first item hover you bring dropdown back with top: auto which allows hovering it again. Transition will also work.

Related

CSS Vertical Menu with submenu callouts overlapping

Its been a while - but I found myself a new exiting hobby in web development, and I am hoping that you can help me overcome the following issue:
I am working on a personal website. Content etc. is all preliminary. My main focus is the vertical menu on the left hand side. While I am pretty happy with the appearance so far, there are still some questions:
1) I had to set the transition as ease out to >0s, so that I have enough time between the main-menu hover and the hover over the sub-menu. Because of this, if I hover between main-menu items, they will briefly overlap due to the phase out. Is there a way to work around this?
(the focus selector might be an option, but that requires to click the menu item, and I prefer the hover)
2) The sub-menu is aligned to the top of the li of the main-menu. Because of that, the last item's sub (Testing) exceeds the boundaries of the page, giving whitespace below the page. Is there a way to make the sub-menu shift up if it presses against the edge of the overall body?
I probably could give it a different tag and design it differently, am I am hoping there is a more general solution.
3) Minor issue: When switching from main-menu hover to sub-menu hover, the main-icon "blinks" very briefly. Is that normal behavior? Certainly isn't pretty.
4) Last but not least: As this is my first time doing a website, I would be more than grateful to get your general feedback on inefficiencies in the code, so I can be more lean in the future.
(see updated fiddle below - full code removed to save space.)
Thanks for your help!
EDIT
THanks for your answers - issue #1 has been solved using the approaches you outlined!
However, the last submenu still gives me a bit a headache.
If I use the "last-child" selector, and the code added below, it will not change anything. However, if I give the last "bubble" a different tag, using the exact same code, the bubble will align to the bottom of the last main-menu item, but the containing UL remains defiant.
As you can see from the original CSS, the last "relative" is the main-menu IL, so shouldn't the submenu and the containing UL both align to the bottom of their respective parent/grandparent?
using a dedicated, different tag for the last-child "bubble_last
Using the last-child selector
and the accompanying new code (updated fiddle with full code: Heres the Fiddle ...use large screen for the result to see the alignment issue):
.navigation ul li:last-child {
border: solid orange;
}
.navigation .bubble_last{
position: absolute;
margin-top: 0%;
padding: 0px;
left: 60px;
bottom: 0px;
width: 400px;
height: 200px;
border: solid red;
}
.navigation .bubble_last ul{
position: absolute;
left: 0;
bottom: : 0px;
margin-top: 0px;
padding: 0px;
width: 20vw;
height: 100px;
font-size: 15px;
font-size: 1.2vw;
font-weight: 400;
border: solid blue;
margin-left: 28%;
display: block;
}
.navigation .bubble_last ul li {
list-style: none;
background-color: none;
border-radius: 3px;
height: 2vw;
line-height: 1.2vw;
width: 20vw;
position: relative;
padding-top: 0px;
margin: 0;
padding: 0;
}
Instead of adding a transition delay on .bubble, you just need to make the .bubble class wide enough (and start behind the main li trigger with a left: 60px) so that the hover will be continuous:
.navigation .bubble {
position: absolute;
margin-top: 0%;
padding: 0px;
left: 60px;
top: 0px;
width: 200px;
height: 100%;
background-color: none;
}
Then just add a margin-left to the submenu:
.navigation ul li ul {
margin-left: 20px;
}
To fix your second issue, simply add the following CSS to make the last submenu positioned relative to the bottom of the nav item:
ul li ul.subm:last-child {
top: auto;
bottom:0px;
}
Updated Demo: JSFiddle
How about this? Adjust your navigation to use the nav element, set it to use flex box, adjust that so it fits the height of your page, and then adjust the transition effects so they transition in and out properly.
I hope this helps.
#import url("http://fonts.googleapis.com/css?family=Roboto");
* {
border: none;
margin: 0;
padding: 0;
}
html,
body {
margin: 0;
padding: 0;
height: 100%;
width: 100%;
font-family: Roboto Condensed;
box-sizing: border-box;
}
.landing {
display: table;
margin: auto;
width: 100%;
height: 100%;
background: url("https://imageshack.com/i/poXkyeIYj") 50% 50% no-repeat;
background-size: cover;
top: 0;
position: relative;
z-index: 1;
}
.landing .welcome {
margin: 10px;
width: 89%;
color: #FFF;
text-align: center;
display: table-cell;
vertical-align: middle;
position: absolute;
left: 10%;
top: 30%;
}
#mug {
background: url("https://imageshack.com/i/pmJaAuFkj") 50% 50% no-repeat;
background-size: cover;
border: solid 3px #FFF;
/*max-width: 20%;
max-height: 20%; */
width: 150px;
height: 150px;
margin: auto;
border-radius: 100%;
}
nav {
width: 50px;
height: 100%;
flex: 1;
display: flex;
justify-content: center;
flex-direction: column;
}
nav img {
max-width: 50px;
max-height: 50px;
}
.nav ul {
*zoom: 1;
list-style: none;
margin: 0;
padding: 0;
-ms-flex: 0 100px;
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
justify-content: space-between;
margin-top: 0px;
padding: 0px;
width: 11vw;
height: auto;
font-size: 15px;
font-size: 1.2vw;
font-weight: 400;
border-color: none;
}
nav ul li {
background-color: rgba(222, 225, 229, 0.8);
border-radius: 3px;
width: 100%;
font-size: 15px;
font-size: 1.2vw;
font-weight: 900;
}
.nav ul:before,
.nav ul:after {
content: "";
display: block;
}
.nav ul:after {
clear: both;
}
.nav ul>li {
position: relative;
}
.nav a {
display: block;
padding: 10px 20px;
line-height: 1.2em;
color: #fff;
border-left: 1px solid #595959;
text-decoration: none;
color: #FFF;
}
.nav a:hover {
text-decoration: none;
background-color: rgba(242, 93, 38, 0.8);
}
.nav li ul {
background: #273754;
}
.nav li ul li {
width: 200px;
}
.nav li ul a {
border: none;
}
.nav li ul a:hover {
background: rgba(0, 0, 0, 0.2);
}
.nav li ul {
position: absolute;
left: 11vw;
top: 0;
z-index: 1;
visibility: hidden;
opacity: 0;
filter: alpha(opacity=0);
-webkit-transition: 200ms ease;
-moz-transition: 200ms ease;
-o-transition: 200ms ease;
transition: 200ms ease;
}
.nav ul>li:hover ul {
visibility: visible;
opacity: 1;
filter: alpha(opacity=100);
}
span.caption {
display: none;
}
<body>
<div class="landing">
<div class="welcome">
<div id="mug">
</div>
<h1>Welcome to my personal Website!</h1>
<h2>On this site you will find a information about the person, the profession and other stuff about me. Enjoy!</h2>
</div>
<!-- cleaned up the navigation, nested it within the rest of the page, and adjusted the css -->
<nav class="nav">
<ul>
<li>
<img src="https://imageshack.com/i/potj2pVwp"> <span class="caption">Home</span>
</li>
<li>
<img src="https://imageshack.com/i/pntQ9nVMp"><span class="caption">About Me</span>
<ul>
<li>What I do</li>
<li>Motorcycling</li>
<li>Music</li>
</ul>
</li>
<li>
<img src="https://imageshack.com/i/po4WFq6Yp"><span class="caption">Professional</span>
<ul>
<li>Current Employment</li>
<li>Working Experience</li>
<li>Education</li>
</ul>
</li>
<li>
<img src="https://imageshack.com/i/pmcfm7Kbp"> <span class="caption">Projects</span>
<ul>
<li>Subnav Item</li>
<li>Subnav Item</li>
<li>Subnav Item</li>
</ul>
</li>
<li>
<img src="https://imageshack.com/i/pnM0Fmgrp"> <span class="caption">Misc</span>
<ul>
<li>Subnav Item</li>
<li>Subnav Item</li>
<li>Subnav Item</li>
</ul>
</li>
<li>
<img src="https://imageshack.com/i/poqRnk6ap"> <span class="caption">Testing</span>
<ul>
<li>Subnav Item</li>
<li>Subnav Item</li>
<li>Subnav Item</li>
</ul>
</li>
<li>
<img src="https://imageshack.com/i/pmc8tts9p"> <span class="caption">Contact</span>
</li>
</ul>
</nav>
</div>

Align ::before pseudo element with list item contents

I have a side navigation I'm building, and it needs to be fully keyboard accessible as well as have the links themselves nested in list items. Everything else works fine, but I've been asked to produce a hover animation which is an animated pseudo element.
I've got most of that done, being the structure of the nav and the animation. However, the animated ::before element always seems to show up at the top of the list item, and will push the anchor down by whatever height I've set. I've tried both height:inherit and 100% for the ::before content, but that doesn't work.
The ideal behavior is that the content would animate in-line with the anchor from the bottom to the top, and simply occupy the height (100%) of the li element with my specified width.
Note: I can't use list-style:none because a screen reader will not identify how many items are in the list.
EDIT: took out the button element. Just focusing on the menu.
Here's a CodePen: https://codepen.io/anon/pen/EZbLMY
Feel free to fork it.
HTML:
<div id="mySidenav" class="sidenav" aria-label="Menu" aria-hidden="true">
<nav>
<ul role="navigation">
<li id="about">About</li>
<li id="services">Services</li>
<li id="clients">Clients</li>
<li id="contact">Contact</li>
</ul>
</nav>
</div>
CSS:
/* The side navigation menu */
.sidenav {
height: 100%;
width: 250px;
position: absolute;
z-index: 2;
top: 0;
background-color: #fff;
overflow-x: hidden;
padding-top: 60px;
}
.showOverlay{
display: block !important;
}
/* The navigation menu links */
.sidenav a{
padding: 8px 8px 8px 32px;
text-decoration: none;
font-size: 25px;
color: #000;
display: block;
width: inherit;
}
/*Clean up space between elements*/
.sidenav nav ul{
padding: 0;
margin: 0;
}
.sidenav nav ul li::before{
content:"";
width: 4px;
height: 0px;
display: block;
background-color: #000000;
}
.sidenav nav ul li:hover::before{
height: 20px;
transition: 0.3s ease-out;
padding-left: 2px;
}
Change the position of the ::before element to absolute. Also, to line things up neatly, add a position:relative to the li elements.
/* The side navigation menu */
.sidenav {
height: 100%;
width: 250px;
position: absolute;
z-index: 2;
top: 0;
background-color: #fff;
overflow-x: hidden;
padding-top: 60px;
}
.showOverlay {
display: block !important;
}
/* The navigation menu links */
.sidenav a {
padding: 8px 8px 8px 32px;
text-decoration: none;
font-size: 25px;
color: #000;
display: block;
width: inherit;
}
/*Clean up space between elements*/
.sidenav nav ul {
padding: 0;
margin: 0;
}
/*Make li elements relative, so that the before elements are positioned correctly*/
.sidenav nav ul li {
position: relative;
}
.sidenav nav ul li::before {
content: "*";
width: 4px;
height: 0px;
display: block;
background-color: #000000;
/*Add absolute positioning*/
position: absolute;
top: 8px;
}
.sidenav nav ul li:hover::before {
height: 20px;
transition: 0.3s ease-out;
padding-left: 2px;
}
<div id="mySidenav" class="sidenav" aria-label="Menu" aria-hidden="true">
<nav>
<ul role="navigation">
<li id="about">About</li>
<li id="services">Services</li>
<li id="clients">Clients</li>
<li id="contact">Contact</li>
</ul>
</nav>
</div>

CSS - Z-index is not working with positions relative and absolute

I've made dropdown menu using pure css3, but one property(z-index) is not working as I expected and that is a very big problem, because the dropdown list is dropping ABOVE the menu. Ideally it must be dropped UNDER the menu. I've tried to do something with that problem all day but unfortunately can't figure it out, so now asking for help...
I've made a different background-colors for problem items for good seeing what i'm trying to reach. The main aim is that sub-menu with red background must be under the blue background.
P.S. I've already tried to make this menu with jQuery slideDown/slideUp properties but they don't look like ideal slide effect(as in my example). They look more like stretching, and that's not what I want..
EXAMPLE ON JSFIDDLE
ul {
list-style-type: none;
}
.menu_wrapper {
position: relative;
z-index: 999;
/* IS NOT WORKING... O_o...*/
height: 70px;
width: 600px;
background-color: blue;
}
.menu li {
display: inline;
float: left;
display: table;
height: inherit;
margin: 3px;
margin-top: 10px;
}
.menu li a {
display: table-cell;
font-family: Verdana;
font-size: 16px;
color: gold;
text-align: center;
text-decoration: none;
padding-left: 10px;
padding-right: 10px;
vertical-align: middle;
background: #05487F;
transition: .2s ease-in-out;
}
.sub-menu {
position: absolute;
z-index: 1;
/* IS NOT WORKING... O_o...*/
margin-top: -200px;
margin-left: -132px;
padding: 15px;
padding-top: 20px;
background-color: red;
transition: all 1s ease-in-out;
}
.sub-menu li {
float: none;
}
.sub-menu li a {
padding: 5px 15px;
}
.menu li a:hover + .sub-menu {
margin-top: 40px;
}
.sub-menu:hover {
margin-top: 40px;
}
<nav class="menu_wrapper">
<ul class="menu">
<li>About
</li>
<li>News
</li>
<li>
PROBLEM HERE<br>(HOVER THIS)
<ul class="sub-menu">
<li>link 1
</li>
<li>link 2
</li>
<li>link 3
</li>
</ul>
</li>
<li>Something
</li>
<li>Contacts
</li>
</ul>
</nav>
The problem is that you're establishing a stacking context on .menu_wrapper when you set z-index: 999. When a stacking context is established, you cannot position a descendant element behind an ancestor.
Remove z-index: 999 from .menu_wrapper:
.menu_wrapper {
position: relative;
/* z-index: 999; << remove */
height: 70px;
width: 600px;
background-color: blue;
}
Then change the z-index on .sub-menu from 1 to a negative number such as -1:
Updated Example
.sub-menu {
position: absolute;
z-index: -1;
margin-top: -200px;
margin-left: -132px;
padding: 15px;
padding-top: 20px;
background-color: red;
transition: all 1s ease-in-out;
}
Here is the deal with z-index.
Z-index is relative to its parent (and ultimately relative to the Window object) in the normal DOM flow. However, Absolutely positioned objects are removed from the normal DOM flow and therefore, Z-Index is relative to itself - rather than the Window object.
In your case, you have not set position for your parent menu, so it will be automatically assigned position:static which CANNOT be z-indexed.
Adding the following to your parent menu should allow you to z-index the submenu to rest above it.
position:relative;
z-index:1;

Delay before drop-down menu disappears

I've managed to create a drop-down menu using CSS and HTML. The drop-down menu will appear when mouse-hovered.
I want the drop-down menu to disappear 1 second after the mouse is hovered out. For this, I've tried adding
transition: display 1s;
into .dropdown:hover .dropdown_list, .dropdown_list:hover but it doesn't do anything.
My Code:
* {
margin: 0;
padding: 0;
}
header {
position: fixed;
height: 35px;
width: 100%;
background: black;
}
.top-container {
margin-top: 7px;
}
/* Code for drop-down list */
.dropdown {
margin-left: 100px;
display: inline-block;
color: #FFF;
}
.dropdown:hover {
text-shadow:0px 4px 7px white;
}
.dropdown:hover .dropdown_list,
.dropdown_list:hover {
display: block;
top:100%;
transition: display 1s; /* Doesn't work */
}
.dropdown_list {
list-style: none;
display: none;
position: absolute;
color: red;
width: 100px;
}
.dropdown_list li {
background: yellow;
}
li {
border: 1px solid black;
}
<body>
<header>
<div class="top-container">
<div class="dropdown">Dropdown ❱
<ul class="dropdown_list">
<li>item 1</li>
<li>item 2</li>
<li>item 3</li>
</ul>
</div>
</div>
</header>
</body>
How do I make a one second delay for the drop-down menu to disappear after hovering out? Is this possible without any jQuery or Javascript?
Transition only applies to properties with numerical values. Display uses discrete values, so it cannot receive any transition effects.
With just CSS you can use top or similar properties to 'hide' the drop-down menu (jsfiddle).
.dropdown:hover .dropdown_list,
.dropdown_list:hover {
top: 100%;
transition: none;
}
.dropdown_list {
top: -10000%;
display: block;
transition: top 1s step-end;
}

Hover to view animation on a link with CSS

I am trying to create an effect on a website like this one: http://www.cssplay.co.uk/menu/css3-animation.html#x . My code only uses two images at the moment but I'll be using about 10 to 15 for the final animation. I'm trying to achieve the hover to view animation, the second image,not the click effect. Here's the code:
.footer nav ul.homeandlist li {
display: block;
width: 40%;
height: 150px;
float: left;
margin: 1% 3%;
background-color: rgba(255, 165, 0, 0.11);
}
.footer nav ul.homeandlist a {
margin: 0;
padding: auto;
width: 100%;
height: 90px;
text-indent: -9000px;
line-height: 2em;
font-size: 16px;
display: block;
}
.footer nav ul.homeandlist .GetOnList {
position: relative;
width: 40%;
height: 150px;
}
.footer nav ul.homeandlist .GetOnList a {
display: block;
-webkit-transition: z-index 0.1s linear;
transtion: z-index 0.1s linear;
}
.footer nav ul.homeandlist .GetOnList a#a1 {
background: url('images/image1.png');
}
.footer nav ul.homeandlist .GetOnList a#a2 {
background: url('images/image2.png');
}
.footer nav ul.homeandlist .hover a:hover {
z-index: 20;
}
.footer nav ul.homeandlist .hover a:hover + a {
z-index: 30;
}
.footer nav ul.homeandlist .hover a#a1 {
z-index: 20;
}
.footer nav ul.homeandlist .hover a#a2 {
z-index: 10;
}
<div class="footer">
<nav>
<p class="footertext">Text will go here</p>
<div class="clear"></div>
<ul class="homeandlist">
<li class="GetOnList hover">
<a id="a1" href="GetOnList.html">Get On List</a>
<a id="a2" href="GetOnList.html">Get On List</a>
</li>
<li class="HomeLink">HomeLink
</li>
</ul>
</nav>
</div>
So far only image 1 shows up but nothing happens on hover. To me it looks like I'm using the same code as what's used on the website. Any ideas?
I've edited the code to remove parts that may not matter. If more code is needed let me know and I can include what you need, but this should cover it.
Here's a new example: http://jsbin.com/wixume/5/edit
The code uses selectors to
MARK UP:
<div class="footer">
<nav>
<ul class="homeandlist">
<li id="addedId"><a id="a1">Get On List</a></li>
<li id="anotherAddedId"><a id="a2">Get On List</a></li>
<li id="lastOne"><a id="a3">Get On List</a></li>
</ul>
</nav>
</div>
CSS:
.footer nav ul.homeandlist li {
display: block;
}
.footer nav ul.homeandlist a {
width: 100%;
height: 90px;
display: block;
}
a{
position:absolute;
}
.footer nav ul.homeandlist li {
position: absolute;
width: 40%;
height: 150px;
}
.footer nav ul.homeandlist li {
display: block;
-webkit-transition: z-index 0.9s linear;
transtion: z-index 0.9s linear;
}
#a1 {
background-color: red;
}
#a2 {
background-color: yellow;
}
#a3 {
background-color: blue;
}
#addedId:hover {
/* Move the first one to the bottom when hover*/
z-index: 9;
}
li:hover + li {
/*
Move the second li to the top
If move mouse, the element below it gets selected and moved to the top.
...and so on for each one below that...
Once are hovering on the bottom one and we move,
nothing for a moment has a hover state so we can see the top li.
And then it starts all back over.
*/
z-index: 30;
}
#addedId {
z-index: 20;
}
#anotherAddedId {
z-index: 19;
}
#lastOne:{
z-index:10;
}