My webdesign is consisted of three parts.
- The red part is
<ul>and<li>, classic list (menu). - Yellow part is another list in previous red list (submenu) and
- blue part is normaly
<div>.
I need the yellow list on top, blue in middle and red at the end only in HTML or CSS with z-indexes.
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title></title>
<style>
.menu {
position: absolute;
background-color: red;
z-index: -2;
}
.submenu {
z-index: 99999;
font-size: x-large;
background-color: yellow;
}
.obsah {
position: relative;
color: white;
background-color: blue;
width: 150px;
height: 50px;
z-index: -1;
}
</style>
</head>
<body>
<ul class="menu">
<li>MENU
<ul class="submenu">
<li>SUBMENU</li>
</ul>
</li>
</ul>
<div class="obsah">
DIV
</div>
</body>
</html>