How do I make a dropdown submenu appear next to its parent - html

I have a menu that includes a sub menu which to most parts works well. However, when you click an item in the menu, the sub menu opens but is not lining up next to the item selected. It just stays as the top next to the main menu.
It is rather difficult to explain, so I posted code on as a snippet and would would apprecite it if someone could point out my error. Many thanks
.menu {
width: 100%;
height: 40px;
margin: 0;
padding: 0;
background: #0c323f;
position: static;
}
.navigation {
list-style: none;
padding: 0;
margin: 0 0 0 16px;
background: rgb(58, 58, 58);
font-size: 16px;
}
.navigation li {
float: left;
}
.navigation li:hover {
background: #1a4655;
}
.navigation li:first-child {
-webkit-border-radius: 5px 5px 0 0;
border-radius: 5px 0 0 5px;
}
.navigation li a {
display: block;
padding: 0 20px;
text-decoration: none;
line-height: 40px;
color: #fff;
}
.navigation ul {
display: none;
position: absolute;
list-style: none;
margin-left: -3px;
padding: 0;
}
.navigation ul ul {
left: 100%;
top: 0;
width: 250px;
border-bottom-left-radius: 0 !important;
}
.navigation ul li {
float: none;
}
.navigation li:hover > ul {
display: block;
background: #1a4655;
/* border: solid 3px #fff;*/
border-top: 0;
-webkit-border-radius: 0 0 8px 8px;
border-radius: 0 0 8px 8px;
-webkit-box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.25);
box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.25);
position: absolute;
width: 250px;
}
.navigation li:hover > ul li:hover {
-webkit-border-radius: 0 0 5px 5px;
border-radius: 0 0 5px 5px;
}
.navigation li li a:hover {
background: #0c323f;
color: white;
}
.navigation ul li:last-child a,
.navigation ul li:last-child a:hover {
-webkit-border-radius: 0 0 5px 5px;
border-radius: 0 0 5px 5px;
}
<div class="menu">
<ul class="navigation">
<li>Home</li>
<li>Requests
<ul>
<li>Boxes
<ul>
<li>Add Box(es)</li>
<li>Retrievals</li>
<li>Returns</li>
<li>Destructions</li>
<li>Permanent Retrieval</li>
</ul>
</li>
<li>Files
<ul>
<li>Add File(s)</li>
<li>Retrievals</li>
<li>Returns</li>
<li>Destructions</li>
<li>Permanent File Retrieval</li>
</ul>
</li>
<li>Recycle Collection
<ul>
<li>Sacks</li>
<li>Boxes</li>
</ul>
</li>
<li>Box Supply</li>
<li>Sack Supply</li>
</ul>
</li>
<li>Reports</li>
<li>Invoices</li>
<li>Control Panel</li>
<li>Logout</li>
</ul>
<div class="clear"></div>
</div>

Add position: relative to .navigation ul li.
.menu {
width: 100%;
height: 40px;
margin: 0;
padding: 0;
background: #0c323f;
position: static;
}
.navigation {
list-style: none;
padding: 0;
margin: 0 0 0 16px;
background: rgb(58, 58, 58);
font-size: 16px;
}
.navigation li {
float: left;
}
.navigation li:hover {
background: #1a4655;
}
.navigation li:first-child {
-webkit-border-radius: 5px 5px 0 0;
border-radius: 5px 0 0 5px;
}
.navigation li a {
display: block;
padding: 0 20px;
text-decoration: none;
line-height: 40px;
color: #fff;
}
.navigation ul {
display: none;
position: absolute;
list-style: none;
margin-left: -3px;
padding: 0;
}
.navigation ul ul {
left: 100%;
top: 0;
width: 250px;
border-bottom-left-radius: 0 !important;
}
.navigation ul li {
float: none;
position: relative;
}
.navigation li:hover>ul {
display: block;
background: #1a4655;
/* border: solid 3px #fff;*/
border-top: 0;
-webkit-border-radius: 0 0 8px 8px;
border-radius: 0 0 8px 8px;
-webkit-box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.25);
box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.25);
position: absolute;
width: 250px;
}
.navigation li:hover>ul li:hover {
-webkit-border-radius: 0 0 5px 5px;
border-radius: 0 0 5px 5px;
}
.navigation li li a:hover {
background: #0c323f;
color: white;
}
.navigation ul li:last-child a,
.navigation ul li:last-child a:hover {
-webkit-border-radius: 0 0 5px 5px;
border-radius: 0 0 5px 5px;
}
<div class="menu">
<ul class="navigation">
<li>Home</li>
<li>Requests
<ul>
<li>Boxes
<ul>
<li>Add Box(es)</li>
<li>Retrievals</li>
<li>Returns</li>
<li>Destructions</li>
<li>Permanent Retrieval</li>
</ul>
</li>
<li>Files
<ul>
<li>Add File(s)</li>
<li>Retrievals</li>
<li>Returns</li>
<li>Destructions</li>
<li>Permanent File Retrieval</li>
</ul>
</li>
<li>Recycle Collection
<ul>
<li>Sacks</li>
<li>Boxes</li>
</ul>
</li>
<li>Box Supply</li>
<li>Sack Supply</li>
</ul>
</li>
<li>Reports</li>
<li>Invoices</li>
<li>Control Panel</li>
<li>Logout</li>
</ul>
<div class="clear"></div>
</div>

Related

Fill navbar buttons to width of a container

I'm trying to learn navigation bars and dropdowns with HTML & CSS only, and I have encountered an issue, that I can't fill the buttons to the length of a container. I tried to use flexbox but that didn't somehow work.
Here's the code:
body {
background-color: #D4D4D4;
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
line-height: 26px;
color: #666;
margin: 0;
}
.reset {
clear: both;
}
.navigation {
list-style: none;
padding: 0;
margin: 0;
background-color: rgb(58, 58, 58);
border-top: 3px solid #FFF;
box-shadow: 0px 11px 21px 0px rgba(0,0,0,0.59);
}
.navigation li {
float: left;
}
.navigation li:hover {
background-color: #222;
}
.navigation li:first-child {
border-radius: 5px 5px 0 0;
-webkit-border-radius: 5px 5px 0 0;
-moz-border-radius: 5px 5px 0 0;
-ms-border-radius: 5px 5px 0 0;
-o-border-radius: 5px 5px 0 0;
}
.navigation li a {
display: block;
padding: 0 20px;
text-decoration: none;
line-height: 40px;
color: #FFF;
}
.navigation ul {
display: none;
position: absolute;
list-style: none;
margin-left: -3px;
padding: 0;
overflow: hidden;
}
.navigation ul li {
float: none;
}
.navigation li:hover > ul li:hover {
border-radius: 0 0 5px 5px;
-webkit-border-radius: 0 0 5px 5px;
-moz-border-radius: 0 0 5px 5px;
-ms-border-radius: 0 0 5px 5px;
-o-border-radius: 0 0 5px 5px;
}
.navigation li li a:hover {
background-color: #000;
}
.navigation ul li:last-child a,
.navigation ul li:last-child a:hover {
border-radius: 0 0 5px 5px;
-webkit-border-radius: 0 0 5px 5px;
-moz-border-radius: 0 0 5px 5px;
-ms-border-radius: 0 0 5px 5px;
-o-border-radius: 0 0 5px 5px;
}
.navigation li:hover {
border-bottom: 2px solid dodgerblue;
}
.navigation li {
border-bottom: 2px solid transparent;
}
#media screen and (min-width: 1281px) {
.submenu::after {
content: " +";
}
.navigation li:hover .submenu::after {
content: " –";
}
.navigation li:hover > ul {
display: block;
background-color: #222;
border: 3px solid #FFF;
border-top: 0;
border-radius: 0 0 8px 8px;
-webkit-border-radius: 0 0 8px 8px;
-moz-border-radius: 0 0 8px 8px;
-ms-border-radius: 0 0 8px 8px;
-o-border-radius: 0 0 8px 8px;
box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.25);
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./css/navbar.css">
<title>My Website</title>
</head>
<body>
<div id="container">
<!-- HEADER -->
<header>
<ul class="navigation">
<li>HOME</li>
<li><a class="submenu" href="#">DROPDOWN 1</a>
<ul>
<li>PLACEHOLDER 1</li>
<li>PLACEHOLDER 2</li>
<li>PLACEHOLDER 3</li>
</ul>
</li>
<li><a class="submenu" href="#">DROPDOWN 2</a>
<ul>
<li>PLACEHOLDER 1</li>
<li>PLACEHOLDER 2</li>
<li>PLACEHOLDER 3</li>
</ul>
</li>
<li>LINK 1</li>
<li>LINK 2</li>
<li>LINK 3</li>
<div class="reset"></div>
</ul>
</header>
</div>
</body>
</html>
Try this code:
body {
background-color: #D4D4D4;
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
line-height: 26px;
color: #666;
margin: 0;
}
.reset {
clear: both;
}
.navigation {
list-style: none;
padding: 0;
margin: 0;
background-color: rgb(58, 58, 58);
border-top: 3px solid #FFF;
box-shadow: 0px 11px 21px 0px rgba(0,0,0,0.59);
display: flex;
}
.navigation li {
flex: 1 0 auto;
}
.navigation li:hover {
background-color: #222;
}
.navigation li:first-child {
border-radius: 5px 5px 0 0;
-webkit-border-radius: 5px 5px 0 0;
-moz-border-radius: 5px 5px 0 0;
-ms-border-radius: 5px 5px 0 0;
-o-border-radius: 5px 5px 0 0;
}
.navigation li a {
display: block;
padding: 0 5px;
text-decoration: none;
line-height: 40px;
color: #FFF;
}
.navigation ul {
display: none;
position: absolute;
list-style: none;
margin-left: -3px;
padding: 0;
overflow: hidden;
}
.navigation ul li {
float: none;
}
.navigation li:hover > ul li:hover {
border-radius: 0 0 5px 5px;
-webkit-border-radius: 0 0 5px 5px;
-moz-border-radius: 0 0 5px 5px;
-ms-border-radius: 0 0 5px 5px;
-o-border-radius: 0 0 5px 5px;
}
.navigation li li a:hover {
background-color: #000;
}
.navigation ul li:last-child a,
.navigation ul li:last-child a:hover {
border-radius: 0 0 5px 5px;
-webkit-border-radius: 0 0 5px 5px;
-moz-border-radius: 0 0 5px 5px;
-ms-border-radius: 0 0 5px 5px;
-o-border-radius: 0 0 5px 5px;
}
.navigation li:hover {
border-bottom: 2px solid dodgerblue;
}
.navigation li {
border-bottom: 2px solid transparent;
}
#media screen and (min-width: 1281px) {
.submenu::after {
content: " +";
}
.navigation li:hover .submenu::after {
content: " –";
}
.navigation li:hover > ul {
display: block;
background-color: #222;
border: 3px solid #FFF;
border-top: 0;
border-radius: 0 0 8px 8px;
-webkit-border-radius: 0 0 8px 8px;
-moz-border-radius: 0 0 8px 8px;
-ms-border-radius: 0 0 8px 8px;
-o-border-radius: 0 0 8px 8px;
box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.25);
}
}
<div id="container">
<!-- HEADER -->
<header>
<ul class="navigation">
<li>HOME</li>
<li><a class="submenu" href="#">DROPDOWN 1</a>
<ul>
<li>PLACEHOLDER 1</li>
<li>PLACEHOLDER 2</li>
<li>PLACEHOLDER 3</li>
</ul>
</li>
<li><a class="submenu" href="#">DROPDOWN 2</a>
<ul>
<li>PLACEHOLDER 1</li>
<li>PLACEHOLDER 2</li>
<li>PLACEHOLDER 3</li>
</ul>
</li>
<li>LINK 1</li>
<li>LINK 2</li>
<li>LINK 3</li>
<div class="reset"></div>
</ul>
</header>
</div>

Dropdown sub menu not showing as expected

I am trying to create a sub menu in a html navigation menu. The menu is appearing but it is showing in the menu list instead of to the right. I have made a screenshot of the problem and would be grateful if someone could help me adapt my code.
You will see from the screenshot, that the sub menu is appearing in the main menu and not off to the right of the selected link.
I have tried so many options that I need to turn to the experts for help.
Many thanks
.menu {
width: 100%;
height: 40px;
margin: 0;
padding: 0;
background: #0c323f;
position: static;
}
.navigation {
list-style: none;
padding: 0;
margin: 0;
background: rgb(58, 58, 58);
font-size: 16px;
}
.navigation li {
float: left;
}
.navigation li:hover {
background: #1a4655;
}
.navigation li:first-child {
-webkit-border-radius: 5px 5px 0 0;
border-radius: 5px 0 0 5px;
}
.navigation li a {
display: block;
padding: 0 20px;
text-decoration: none;
line-height: 40px;
color: #fff;
}
.navigation ul {
display: none;
position: absolute;
list-style: none;
margin-left: -3px;
padding: 0;
overflow: hidden;
}
.navigation ul li {
float: none;
}
.navigation li:hover>ul {
display: block;
background: #1a4655;
/* border: solid 3px #fff;*/
border-top: 0;
-webkit-border-radius: 0 0 8px 8px;
border-radius: 0 0 8px 8px;
-webkit-box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.25);
box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.25);
position: absolute;
}
.navigation li:hover>ul li:hover {
-webkit-border-radius: 0 0 5px 5px;
border-radius: 0 0 5px 5px;
}
.navigation li li a:hover {
background: #0c323f;
color: white;
}
.navigation ul li:last-child a,
.navigation ul li:last-child a:hover {
-webkit-border-radius: 0 0 5px 5px;
border-radius: 0 0 5px 5px;
}
<div class="menu">
<ul class="navigation">
<li>Home</li>
<li>Requests
<ul>
<li>Boxes
<ul>
<li>Files</li>
<li>Recycle</li>
<li>Box Supply</li>
</ul>
</li>
<li>Files</li>
<li>Recycle</li>
<li>Box Supply</li>
<li>Recycle</li>
<li>Destruction</li>
<li>Destruction Schedules</li>
</ul>
</li>
<li>Reports</li>
<li>Invoices</li>
<li>Control Panel</li>
<li>Logout</li>
</ul>
<div class="clear"></div>
</div>
Image screenshot
Normal dropdown
Sub menu showing problem
Use top:0 and left:100% to the 2nd level submenu
Stack Snippet
.menu {
width: 100%;
height: 40px;
margin: 0;
padding: 0;
background: #0c323f;
position: static;
}
.navigation {
list-style: none;
padding: 0;
margin: 0;
background: rgb(58, 58, 58);
font-size: 16px;
}
.navigation li {
float: left;
}
.navigation li:hover {
background: #1a4655;
}
.navigation li:first-child {
-webkit-border-radius: 5px 5px 0 0;
border-radius: 5px 0 0 5px;
}
.navigation li a {
display: block;
padding: 0 20px;
text-decoration: none;
line-height: 40px;
color: #fff;
}
.navigation ul {
display: none;
position: absolute;
list-style: none;
margin-left: -3px;
padding: 0;
}
.navigation ul ul {
left: 100%;
top: 0;
}
.navigation ul li {
float: none;
}
.navigation li:hover>ul {
display: block;
background: #1a4655;
/* border: solid 3px #fff;*/
border-top: 0;
-webkit-border-radius: 0 0 8px 8px;
border-radius: 0 0 8px 8px;
-webkit-box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.25);
box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.25);
position: absolute;
}
.navigation li:hover>ul li:hover {
-webkit-border-radius: 0 0 5px 5px;
border-radius: 0 0 5px 5px;
}
.navigation li li a:hover {
background: #0c323f;
color: white;
}
.navigation ul li:last-child a,
.navigation ul li:last-child a:hover {
-webkit-border-radius: 0 0 5px 5px;
border-radius: 0 0 5px 5px;
}
<div class="menu">
<ul class="navigation">
<li>Home</li>
<li>Requests
<ul>
<li>Boxes
<ul>
<li>Files</li>
<li>Recycle</li>
<li>Box Supply</li>
</ul>
</li>
<li>Files</li>
<li>Recycle</li>
<li>Box Supply</li>
<li>Recycle</li>
<li>Destruction</li>
<li>Destruction Schedules</li>
</ul>
</li>
<li>Reports</li>
<li>Invoices</li>
</ul>
<div class="clear"></div>
</div>

Hide css dropdown menu

I've created a dropdown menu in css. My problem is that the dropdown is fixed on mobile phone if i touch somewhere outside the menu. How can i hide my dropdown menu on mobile phone? On desktop with mouse it works fine.
here is my css:
#nav {
margin: 0;
text-align:center;
position:fixed;
width:1162px;
top: 0%;
left: 50%;
margin-left: -587px; /* Die Hälfte der Breite (width) + 6px */
padding: 7px 6px 0;
background: #7d7d7d url(img/gradient.png) repeat-x 0 -110px;
line-height: 100%;
border-radius: 1em;
-webkit-border-radius: 1em;
-moz-border-radius: 1em;
-webkit-box-shadow: 0 1px 3px rgba(0,0,0, .4);
-moz-box-shadow: 0 1px 3px rgba(0,0,0, .4);
}
#nav li {
margin: 0 5px;
padding: 0 0 8px;
float: left;
position: relative;
list-style: none;
}
/* main level link */
#nav a {
font-weight: bold;
color: #e7e5e5;
text-decoration: none;
display: block;
padding: 8px 20px;
margin: 0;
-webkit-border-radius: 1.6em;
-moz-border-radius: 1.6em;
text-shadow: 0 1px 1px rgba(0,0,0, .3);
}
#nav a:hover {
background: #000;
color: #fff;
}
/* main level link hover */
#nav .current a, #nav li:hover > a {
background: #666 url(img/gradient.png) repeat-x 0 -40px;
color: #444;
border-top: solid 1px #f8f8f8;
-webkit-box-shadow: 0 1px 1px rgba(0,0,0, .2);
-moz-box-shadow: 0 1px 1px rgba(0,0,0, .2);
box-shadow: 0 1px 1px rgba(0,0,0, .2);
text-shadow: 0 1px 0 rgba(255,255,255, 1);
}
/* sub levels link hover */
#nav ul li:hover a, #nav li:hover li a {
background: none;
border: none;
color: #666;
-webkit-box-shadow: none;
-moz-box-shadow: none;
}
#nav ul a:hover {
background: #0078ff url(img/gradient.png) repeat-x 0 -100px !important;
color: #fff !important;
-webkit-border-radius: 0;
-moz-border-radius: 0;
text-shadow: 0 1px 1px rgba(0,0,0, .1);
}
/* dropdown */
#nav li:hover > ul {
display: block;
}
/* level 2 list */
#nav ul {
display: none;
margin: 0;
padding: 0;
width: 185px;
position: absolute;
top: 35px;
left: 0;
background: #ddd url(img/gradient.png) repeat-x 0 0;
border: solid 1px #b4b4b4;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
-webkit-box-shadow: 0 1px 3px rgba(0,0,0, .3);
-moz-box-shadow: 0 1px 3px rgba(0,0,0, .3);
box-shadow: 0 1px 3px rgba(0,0,0, .3);
}
#nav ul li {
float: none;
margin: 0;
padding: 0;
}
#nav ul a {
font-weight: normal;
text-shadow: 0 1px 0 #fff;
}
/* level 3+ list */
#nav ul ul {
left: 185px;
top: -1px;
}
/* rounded corners of first and last link */
#nav ul li:first-child > a {
-webkit-border-top-left-radius: 9px;
-moz-border-radius-topleft: 9px;
-webkit-border-top-right-radius: 9px;
-moz-border-radius-topright: 9px;
}
#nav ul li:last-child > a {
-webkit-border-bottom-left-radius: 9px;
-moz-border-radius-bottomleft: 9px;
-webkit-border-bottom-right-radius: 9px;
-moz-border-radius-bottomright: 9px;
}
/* clearfix */
#nav:after {
content: ".";
display: block;
clear: both;
visibility: hidden;
line-height: 0;
height: 0;
}
#nav {
display: inline-block;
}
html[xmlns] #nav {
display: block;
}
* html #nav {
height: 1%;
}
and here the navigation menu set with ul and li
<ul id="nav">
<li class="current">Test</li>
<li>Musik
<ul>
<li>Test</li>
<li>Test
<ul>
<li>Test</li>
</ul>
</li>
</ul>
</li>
</ul>
ul { display:block; padding:0px;}
ul li{ display: inline-block; position:relative;}
ul li ul { display:none; position:absolute; top:100%; left:0;}
ul li ul li { display:block;}
ul li ul li ul { left:100%; top:0;}
ul li:hover > ul { display:block; width:120px;}
<ul>
<li>
Menu option
</li>
<li>
Menu option2
<ul>
<li>
Submenu 1
<ul>
<li>
Submenu 2
</li>
</ul>
</li>
<li>
Submenu
</li>
<li>
Submenu
</li>
</ul>
</li>
</ul>
If you are using hover property to show drop-down menu on desktop then it's automatically hidden on mobile when you touch outside the menu

How to add space between image link and link

I need to know if there is a way to add a space between the image link and Simology on my navigation menu, without adding extra space any where else
here is a link to the actual page here
Here is my code
<div style="text-align: left;">
<style>
#homelink {
background-image: url(http://i946.photobucket.com/albums/ad301/campbellmichelle41109/sims3_logo_ver931034_zpsmnyi2tcj.png);
background-repeat: no-repeat;
background-color: transparent;
display: block;
width: 126px;
height: 140px;
}
#homelink {
position: relative;
padding: 0;
margin: -97px;
}
#mbt-menu, #mbt-me
nu ul {
margin: -15px;
padding: 12px;
list-style: none;
}
#mbt-menu ul {
border: none !important;
padding: 0 !important;
}
#mbt-menu {
width: 100%;
margin: 0px auto;
javascript:void(0)
background-image: url("http://i946.photobucket.com/albums/ad301/campbellmichelle41109/navbg1.1_zps86kuvvkj.png") repeat-x;
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
border-radius: 6px;
}
#mbt-menu:before,
#mbt-menu:after {
content: "";
display: table;
}
#mbt-menu:after {
clear: both;
}
#mbt-menu {
zoom:1;
}
#mbt-menu li {
float: left;
border-right: 1px solid #328ad4;
-moz-box-shadow: 1px 0 0 #469ee8;
-webkit-box-shadow: 1px 0 0 #469ee8;
box-shadow: 0px 0 0 #469ee8;
position: relative;
}
#mbt-menu a {
float: left;
padding: 10px 25px;
color: #ffffff;
text-transform: uppercase;
font: bold 13px 'Trebuchet MS',Arial, sans-serif;
text-decoration: none;
text-shadow: 0 0px 0 #000;
}
#mbt-menu li ul a{
color: #000000;
}
#mbt-menu li ul a:hover{
color: #057BBA;
}
#mbt-menu li:hover > a {
color: #0;
}
*html #mbt-menu li a:hover { /* IE6 only */
color: #000000;
}
#mbt-menu ul li {
border-style: solid;
border-color: #EBEBEB;
}
#mbt-menu ul {
margin: 20px 0 0 0;
_margin: 0; /*IE6 only*/
opaciaty: 0;
visibility: hidden;
position: absolute;
top: 55px;
left: 15px;
z-index: 9999;
background: #ffffff;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
-webkit-transition: all .2s ease-in-out;
-moz-transition: all .2s ease-in-out;
-ms-transition: all .2s ease-in-out;
-o-transition: all .2s ease-in-out;
transition: all .2s ease-in-out;
}
#mbt-menu li:hover > ul {
opacity: 1;
visibility: visible;
margin: 0;
}
#mbt-menu ul ul {
top: 0;
left: 150px;
margin: 0 0 0 20px;
_margin: 0; /*IE6 only*/
}
#mbt-menu ul li {
float: none;
display: block;
border: 0;
_line-height: 0; /*IE6 only*/
border: 1px solid #EBEBEB;
background:#fff !important;
}
#mbt-menu ul li:last-child {
-moz-box-shadow: none;
-webkit-box-shadow: none;
box-shadow: none;
}
#mbt-menu ul a {
padding: 7px;
width: 113px;
_height: 9px; /*IE6 only*/
display: block;
white-space: nowrap;
float: none;
text-transform: none;
}
#mbt-menu ul a{
font-size: 12px;
}
#mbt-menu ul a:hover {
background-color: #ffffff;
}
#mbt-menu ul li:first-child > a {
-moz-border-radius: 3px 3px 0 0;
-webkit-border-radius: 3px 3px 0 0;
border-radius: 3px 3px 0 0;
}
#mbt-menu ul ul li:first-child a:after {
left: -6px;
top: 50%;
margin-top: -6px;
border-left: 0;
border-bottom: 6px solid transparent;
border-top: 6px solid transparent;
border-right: 6px solid #3b3b3b;
}
#mbt-menu ul li:first-child a:hover:after {
border-bottom-color: #04acec;
}
#mbt-menu ul ul li:first-child a:hover:after {
border-right-color: #0299d3;
border-bottom-color: transparent;
}
#mbt-menu ul li:last-child > a {
-moz-border-radius: 0 0 3px 3px;
-webkit-border-radius: 0 0 3px 3px;
border-radius: 0 0 3px 3px;
}
/* non links */
#mbt-menu ul {
color: #000000;
font-size: 12px;
}
#mbt-menu li ul:hover {
color: #057BBA;
}
#mbt-menu ul {
pading: 7px;
width: 130px;
height: 34px;
_height: 9px;
display: block;
white-space: nowrap;
float: none;
text-transform: none;
}
#mbt-menu {
font: bold 13px 'Trebuchet MS', Arial, sans-serif;
text-decoration: none;
text-shadow: 0 0px 0 #000;
}
</style>
<div align=center>
<ul id="mbt-menu">
<li><a id=homelink href="http://thesims3addictresource.blogspot.com/"></a></li>
<li>
Simology
<ul>
<li>Sims
<ul>
<li>Faries</li>
<li>Ghosts</li>
<li>Plant Sims</li>
<li>Witches</li>
<li>Werewolves</li>
<li>Vampires</li>
<li>Zombies
</li></ul>
</li>
<li>Needs</li>
<li>Skills</li>
<li>Traits</li>
<li>Moodlets</li>
<li>Life & Death
<ul>
<li>Death</li>
<li>Ghosts</li>
</ul>
</li>
<li>Lifetime Wishes</li>
<li>Life Time Rewards</li>
</ul>
</li>
<li>
Petology
<ul>
<li>Horses
<ul>
<li>Traits</li>
<li>Skills</li>
<li>Breeding</li>
<li>Lifetime Rewards</li>
</ul> </li>
</ul>
</li>
<li>
Expansion Guide
<ul>
<li>Ambitions
<ul>
<li>New Skills</li>
<li>New Lifetime Rewards</li>
<li>Celebrities</li>
</ul>
<li>Generations</li>
<li>Pets</li>
<li>Late Night</li>
<li>Supernatural</li>
<li>World Adventures</li>
<li>University Life</li>
</li>
</ul>
</li>
<li>
Towns
<ul>
<li>Sunset Valley</li>
<li>Monte Vista</li>
<li>Hidden Springs</li>
<li>Dragon Valley</li>
<li>Roaring Heights</li>
</ul>
</li>
<li>
Free Downloads
<ul>
<li> Custom Sims </li>
<li>Sliders</li>
</ul>
</li>
<li>About</li>
<li>Contact</li>
</ul>
</div>
</div>
</pre>
Use this CSS:
#homelink { margin: -97px -30px -97px -97px; }

CSS sub-menu overlay issue

I'm trying to set up this 2 column menu that is side by side with each of the columns submenus opening to a different side. The left menu is working correctly, and the submenu buttons are clickable, but the right menu submenu items are located under the left menu elements. I tried using z-index, which worked, but made the left-menu items not clickable (hover did not work as well). Please see http://kink.cz/najforever/index_copy.html for reference.
Could you please suggest how I can have the right menu submenu items shown correctly?
Your help is much appreciated.
HTML:
<div class='people'>
<div id='cssmenu'>
<ul>
<li class='active has-sub' id='fake'><a href='#'><span>A fake artist</span></a>
<ul>
<li class='has-sub'><a href='#'><span>Blog</span></a></li>
<li class='has-sub'><a href='#'><span>Facebook</span></a></li>
<li class='has-sub'><a href='#'><span>Instagram</span></a></li>
</ul>
</li>
<li class='active has-sub' id='danny'><a href='#'><span>Danny Rose Fashion</span></a>
<ul>
<li class='has-sub'><a href='#'><span>Blog</span></a></li>
<li class='has-sub'><a href='#'><span>Facebook</span></a></li>
<li class='has-sub'><a href='#'><span>Instagram</span></a></li>
</ul>
</li>
<li class='active has-sub' id='heels'><a href='#'><span>Heels in Prague</span></a>
<ul>
<li class='has-sub'><a href='#'><span>Blog</span></a></li>
<li class='has-sub'><a href='#'><span>Facebook</span></a></li>
<li class='has-sub'><a href='#'><span>Instagram</span></a></li>
</ul>
</li>
<li class='active has-sub' id='hodanajan'><a href='#'><span>Hodanajan</span></a>
<ul>
<li class='has-sub'><a href='#'><span>Blog</span></a></li>
<li class='has-sub'><a href='#'><span>Facebook</span></a></li>
<li class='has-sub'><a href='#'><span>Instagram</span></a></li>
</ul>
</li>
<li class='active has-sub' id='jakub'><a href='#'><span>Jakub Mařík</span></a>
<ul>
<li class='has-sub'><a href='#'><span>Web</span></a></li>
<li class='has-sub'><a href='#'><span>Facebook</span></a></li>
<li class='has-sub'><a href='#'><span>Instagram</span></a></li>
</ul>
</li>
</ul>
</div>
<div id='cssmenu2'>
<ul>
<li class='active has-sub' id='kaa'><a href='#'><span>Kaa Glo</span></a>
<ul>
<li class='has-sub'><a href='#'><span>Blog</span></a></li>
<li class='has-sub'><a href='#'><span>Facebook</span></a></li>
<li class='has-sub'><a href='#'><span>Instagram</span></a></li>
</ul>
</li>
<li class='active has-sub' id='pau'><a href='#'><span>Paulinemma</span></a>
<ul>
<li class='has-sub'><a href='#'><span>Blog</span></a></li>
<li class='has-sub'><a href='#'><span>Facebook</span></a></li>
<li class='has-sub'><a href='#'><span>Instagram</span></a></li>
</ul>
</li>
<li class='active has-sub' id='red'><a href='#'><span>Red Poppy Stories</span></a>
<ul>
<li class='has-sub'><a href='#'><span>Blog</span></a></li>
<li class='has-sub'><a href='#'><span>Facebook</span></a></li>
<li class='has-sub'><a href='#'><span>Instagram</span></a></li>
</ul>
</li>
<li class='active has-sub' id='kisic'><a href='#'>Sandra Kisic</a>
<ul>
<li class='has-sub'><a href='#'><span>Blog</span></a></li>
<li class='has-sub'><a href='#'><span>Facebook</span></a></li>
<li class='has-sub'><a href='#'><span>Instagram</span></a></li>
</ul>
</li>
<li class='active has-sub' id='aesthet'><a href='#'><span>The Aesthet</span></a>
<ul>
<li class='has-sub'><a href='#'><span>Blog</span></a></li>
<li class='has-sub'><a href='#'><span>Facebook</span></a></li>
<li class='has-sub'><a href='#'><span>Instagram</span></a></li>
</ul>
</li>
</ul>
</div>
CSS:
/* ===========================
====== Name Menu Right ======
=========================== */
#cssmenu {
padding: 0;
margin: 0;
border: 0;
line-height: 1;
text-align:left
}
#cssmenu ul,
#cssmenu ul li,
#cssmenu ul ul {
list-style: none;
margin: 0;
padding: 0;
}
#cssmenu ul {
position: relative;
z-index: 597;
float: left;
}
#cssmenu ul li {
float: left;
min-height: 1px;
line-height: 1em;
vertical-align: middle;
position: relative;
}
#cssmenu ul li.hover,
#cssmenu ul li:hover {
position: relative;
z-index: 599;
cursor: default;
}
#cssmenu ul ul {
visibility: hidden;
position: absolute;
top: 100%;
left: 200px;
z-index: 598;
}
#cssmenu ul ul li {
float: none;
right:250px;
}
#cssmenu ul ul ul {
top: -2px;
right: 0;
}
#cssmenu ul li:hover > ul {
visibility: visible;
}
#cssmenu ul ul {
top: 1px;
left: 99%;
}
#cssmenu ul li {
float: none;
}
#cssmenu ul ul {
margin-top: 1px;
}
#cssmenu ul ul li {
font-weight: normal;
}
/* Custom CSS Styles Menu Right*/
#cssmenu {
width: 130px;
background: white;
font-family: 'Oxygen Mono', Tahoma, Arial, sans-serif;
zoom: 1;
font-size: 12px;
float:right;
margin-left:5px;
}
#cssmenu:before {
content: '';
display: block;
}
#cssmenu:after {
content: '';
display: table;
clear: both;
}
#cssmenu a {
display: block;
padding: 6px 0px;
color: black;
text-decoration: none;
padding-right:5px;
}
#cssmenu > ul {
width: 130px;
}
#cssmenu ul ul {
width: 130px;
}
#cssmenu > ul > li > a {
color: black;
}
#cssmenu > ul > li > a:hover {
color: black;
}
#cssmenu > ul > li.active a {
background: white;
}
#cssmenu > ul > li a:hover,
#cssmenu > ul > li:hover a {
background: white;
}
#cssmenu li {
position: relative;
}
#cssmenu ul ul li.first {
-webkit-border-radius: 0 3px 0 0;
-moz-border-radius: 0 3px 0 0;
border-radius: 0 3px 0 0;
}
#cssmenu ul ul li.last {
-webkit-border-radius: 0 0 3px 0;
-moz-border-radius: 0 0 3px 0;
border-radius: 0 0 3px 0;
border-bottom: 0;
}
#cssmenu ul ul {
-webkit-border-radius: 0 3px 3px 0;
-moz-border-radius: 0 3px 3px 0;
border-radius: 0 3px 3px 0;
}
#cssmenu ul ul {
margin-left:2px;
text-align:right;
}
#cssmenu ul ul a {
font-size: 12px;
color: black;
}
#cssmenu ul ul a:hover {
color: black;
}
#cssmenu ul ul li {
}
#cssmenu ul ul li:hover > a {
background: black;
color: #ffffff;
}
#cssmenu.align-right > ul > li > a {
border-left: 4px solid black;
border-right: none;
}
#cssmenu.align-right {
float: right;
}
#cssmenu.align-right li {
text-align: right;
}
#cssmenu.align-right ul li.has-sub > a:after {
content: none;
}
#cssmenu.align-right ul ul {
visibility: hidden;
position: absolute;
top: 0;
left: -100%;
z-index: 598;
width: 100%;
}
#cssmenu.align-right ul ul li.first {
-webkit-border-radius: 3px 0 0 0;
-moz-border-radius: 3px 0 0 0;
border-radius: 3px 0 0 0;
}
#cssmenu.align-right ul ul li.last {
-webkit-border-radius: 0 0 0 3px;
-moz-border-radius: 0 0 0 3px;
border-radius: 0 0 0 3px;
}
#cssmenu.align-right ul ul {
-webkit-border-radius: 3px 0 0 3px;
-moz-border-radius: 3px 0 0 3px;
border-radius: 3px 0 0 3px;
}
/* ===========================
====== Name Menu Left ======
=========================== */
#cssmenu2 {
padding: 0;
margin: 0;
border: 0;
line-height: 1;
text-align:right;
}
#cssmenu2 ul,
#cssmenu2 ul li,
#cssmenu2 ul ul {
list-style: none;
margin: 0;
padding: 0;
}
#cssmenu2 ul {
position: relative;
z-index: 597;
float: left;
}
#cssmenu2 ul li {
float: left;
min-height: 1px;
line-height: 1em;
vertical-align: middle;
position: relative;
}
#cssmenu2 ul li.hover,
#cssmenu2 ul li:hover {
position: relative;
z-index: 599;
cursor: default;
}
#cssmenu2 ul ul {
visibility: hidden;
position: absolute;
top: 100%;
left: 0px;
z-index: 598;
width: 100%;
text-align:left;
}
#cssmenu2 ul ul li {
float: none;
margin-left:4px;
}
#cssmenu2 ul ul ul {
top: -2px;
right: 0;
}
#cssmenu2 ul li:hover > ul {
visibility: visible;
}
#cssmenu2 ul ul {
top: 1px;
left: 99%;
}
#cssmenu2 ul li {
float: none;
}
#cssmenu2 ul ul {
margin-top: 1px;
}
#cssmenu2 ul ul li {
font-weight: normal;
}
/* Custom CSS Styles Menu Left*/
#cssmenu2 {
width: 130px;
background: white;
font-family: 'Oxygen Mono', Tahoma, Arial, sans-serif;
zoom: 1;
font-size: 12px;
float:right;
margin-left:5px;
}
#cssmenu2:before {
content: '';
display: block;
}
#cssmenu2:after {
content: '';
display: table;
clear: both;
}
#cssmenu2 a {
display: block;
padding: 6px 0px;
color: black;
text-decoration: none;
padding-right:5px;
}
#cssmenu2 > ul {
width: 130px;
}
#cssmenu2 ul ul {
width: 130px;
}
#cssmenu2 > ul > li > a {
border-right: 4px solid black;
color: black;
}
#cssmenu2 > ul > li > a:hover {
color: black;
}
#cssmenu2 > ul > li.active a {
background: white;
}
#cssmenu2 > ul > li a:hover,
#cssmenu2 > ul > li:hover a {
background: white;
}
#cssmenu2 li {
position: relative;
}
#cssmenu2 ul ul li.first {
-webkit-border-radius: 0 3px 0 0;
-moz-border-radius: 0 3px 0 0;
border-radius: 0 3px 0 0;
}
#cssmenu2 ul ul li.last {
-webkit-border-radius: 0 0 3px 0;
-moz-border-radius: 0 0 3px 0;
border-radius: 0 0 3px 0;
border-bottom: 0;
}
#cssmenu2 ul ul {
border-right: 2px solid black;
background:white;
margin-top:-2px;
}
#cssmenu2 ul ul {
margin-left:2px;
}
#cssmenu2 ul ul a {
font-size: 12px;
color: black;
}
#cssmenu2 ul ul a:hover {
color: black;
}
#cssmenu2 ul ul li {
}
#cssmenu2 ul ul li:hover > a {
background: black;
color: #ffffff;
}
#cssmenu2.align-right > ul > li > a {
border-left: 4px solid black;
border-right: none;
}
#cssmenu2.align-right {
float: right;
}
#cssmenu2.align-right li {
text-align: right;
}
#cssmenu2.align-right ul li.has-sub > a:after {
content: none;
}
#cssmenu2.align-right ul ul {
visibility: hidden;
position: absolute;
top: 0;
left: -100%;
z-index: 598;
width: 100%;
}
#cssmenu2.align-right ul ul li.first {
-webkit-border-radius: 3px 0 0 0;
-moz-border-radius: 3px 0 0 0;
border-radius: 3px 0 0 0;
}
#cssmenu2.align-right ul ul li.last {
-webkit-border-radius: 0 0 0 3px;
-moz-border-radius: 0 0 0 3px;
border-radius: 0 0 0 3px;
}
#cssmenu2.align-right ul ul {
-webkit-border-radius: 3px 0 0 3px;
-moz-border-radius: 3px 0 0 3px;
border-radius: 3px 0 0 3px;
}
/* ===========================
====== Contact Form ======
=========================== */
input, textarea {
padding: 10px;
border: 1px solid #E5E5E5;
width: 400px;
color: #999999;
box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 8px;
-moz-box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 8px;
-webkit-box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 8px;
}
textarea {
width: 400px;
height: 150px;
max-width: 400px;
line-height: 18px;
}
input:hover, textarea:hover,
input:focus, textarea:focus {
border-color: 1px solid #C9C9C9;
box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px;
-moz-box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px;
-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px;
}
.form label {
color: #999999;
}
/* Submit Button */
.submit input {
width: 100px;
height: 40px;
background-color: #474E69;
color: #FFF;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
}
Hopefully It will work, I have checked #MarianRehak..
just remove z-index from
#cssmenu2 ul{}
and add this class
#cssmenu2 ul li:hover ul {
z-index: 999999 !important;
}
Rest you can play with the position.. the basic issue will be resolved now..
Fixed your CSS. Changes applied on many places. You'll need to apply some more CSS to make menu look same is the left menu.
#cssmenu {
padding: 0;
margin: 0;
border: 0;
line-height: 1;
text-align:left
}
#cssmenu ul,
#cssmenu ul li,
#cssmenu ul ul {
list-style: none;
margin: 0;
padding: 0;
}
#cssmenu ul {
position: relative;
z-index: 597;
float: left;
}
#cssmenu ul li {
float: left;
min-height: 1px;
line-height: 1em;
vertical-align: middle;
position: relative;
}
#cssmenu ul li.hover,
#cssmenu ul li:hover {
position: relative;
z-index: 599;
cursor: default;
}
#cssmenu ul ul {
display:none;
position: absolute;
top: 100%;
z-index: 598;
}
#cssmenu ul ul li {
float: none;
}
#cssmenu ul ul ul {
top: -2px;
right: 0;
}
#cssmenu ul li:hover > ul {
display:block;
z-index:99999;
}
#cssmenu ul ul {
top: 1px;
right: 100%;
}
#cssmenu ul li {
float: none;
}
#cssmenu ul ul {
margin-top: 1px;
}
#cssmenu ul ul li {
font-weight: normal;
}
/* Custom CSS Styles Menu Right*/
#cssmenu {
width: 130px;
background: white;
font-family: 'Oxygen Mono', Tahoma, Arial, sans-serif;
zoom: 1;
font-size: 12px;
float:right;
margin-left:5px;
}
#cssmenu:before {
content: '';
display: block;
}
#cssmenu:after {
content: '';
display: table;
clear: both;
}
#cssmenu a {
display: block;
padding: 6px 0px;
color: black;
text-decoration: none;
padding-right:5px;
}
#cssmenu > ul {
width: 130px;
}
#cssmenu ul ul {
width: 130px;
}
#cssmenu > ul > li > a {
color: black;
}
#cssmenu > ul > li > a:hover {
color: black;
}
#cssmenu > ul > li.active a {
background: white;
}
#cssmenu > ul > li a:hover,
#cssmenu > ul > li:hover a {
background: white;
}
#cssmenu li {
position: relative;
}
#cssmenu ul ul li.first {
-webkit-border-radius: 0 3px 0 0;
-moz-border-radius: 0 3px 0 0;
border-radius: 0 3px 0 0;
}
#cssmenu ul ul li.last {
-webkit-border-radius: 0 0 3px 0;
-moz-border-radius: 0 0 3px 0;
border-radius: 0 0 3px 0;
border-bottom: 0;
}
#cssmenu ul ul {
-webkit-border-radius: 0 3px 3px 0;
-moz-border-radius: 0 3px 3px 0;
border-radius: 0 3px 3px 0;
}
#cssmenu ul ul {
margin-left:2px;
text-align:right;
}
#cssmenu ul ul a {
font-size: 12px;
color: black;
}
#cssmenu ul ul a:hover {
color: black;
}
#cssmenu ul ul li {
}
#cssmenu ul ul li:hover > a {
background: black;
color: #ffffff;
}
#cssmenu.align-right > ul > li > a {
border-left: 4px solid black;
border-right: none;
}
#cssmenu.align-right {
float: right;
}
#cssmenu.align-right li {
text-align: right;
}
#cssmenu.align-right ul li.has-sub > a:after {
content: none;
}
#cssmenu.align-right ul ul {
visibility: hidden;
position: absolute;
top: 0;
left: -100%;
z-index: 598;
width: 100%;
}
#cssmenu.align-right ul ul li.first {
-webkit-border-radius: 3px 0 0 0;
-moz-border-radius: 3px 0 0 0;
border-radius: 3px 0 0 0;
}
#cssmenu.align-right ul ul li.last {
-webkit-border-radius: 0 0 0 3px;
-moz-border-radius: 0 0 0 3px;
border-radius: 0 0 0 3px;
}
#cssmenu.align-right ul ul {
-webkit-border-radius: 3px 0 0 3px;
-moz-border-radius: 3px 0 0 3px;
border-radius: 3px 0 0 3px;
}
/* ===========================
====== Name Menu Left ======
=========================== */
#cssmenu2 {
padding: 0;
margin: 0;
border: 0;
line-height: 1;
text-align:right;
}
#cssmenu2 ul,
#cssmenu2 ul li,
#cssmenu2 ul ul {
list-style: none;
margin: 0;
padding: 0;
}
#cssmenu2 ul {
position: relative;
float: left;
}
#cssmenu2 ul li {
float: left;
min-height: 1px;
line-height: 1em;
vertical-align: middle;
position: relative;
}
#cssmenu2 ul li.hover,
#cssmenu2 ul li:hover {
position: relative;
z-index: 599;
cursor: default;
}
#cssmenu2 ul ul {
visibility: hidden;
position: absolute;
top: 100%;
left: 0px;
z-index: 598;
width: 100%;
text-align:left;
}
#cssmenu2 ul ul li {
float: none;
margin-left:4px;
}
#cssmenu2 ul ul ul {
top: -2px;
right: 0;
}
#cssmenu2 ul li:hover > ul {
visibility: visible;
}
#cssmenu2 ul ul {
top: 1px;
left: 99%;
}
#cssmenu2 ul li {
float: none;
}
#cssmenu2 ul ul {
margin-top: 1px;
}
#cssmenu2 ul ul li {
font-weight: normal;
}
/* Custom CSS Styles Menu Left*/
#cssmenu2 {
width: 130px;
background: white;
font-family: 'Oxygen Mono', Tahoma, Arial, sans-serif;
zoom: 1;
font-size: 12px;
float:right;
margin-left:5px;
}
#cssmenu2:before {
content: '';
display: block;
}
#cssmenu2:after {
content: '';
display: table;
clear: both;
}
#cssmenu2 a {
display: block;
padding: 6px 0px;
color: black;
text-decoration: none;
padding-right:5px;
}
#cssmenu2 > ul {
width: 130px;
}
#cssmenu2 ul ul {
width: 130px;
}
#cssmenu2 > ul > li > a {
border-right: 4px solid black;
color: black;
}
#cssmenu2 > ul > li > a:hover {
color: black;
}
#cssmenu2 > ul > li.active a {
background: white;
}
#cssmenu2 > ul > li a:hover,
#cssmenu2 > ul > li:hover a {
background: white;
}
#cssmenu2 li {
position: relative;
}
#cssmenu2 ul ul li.first {
-webkit-border-radius: 0 3px 0 0;
-moz-border-radius: 0 3px 0 0;
border-radius: 0 3px 0 0;
}
#cssmenu2 ul ul li.last {
-webkit-border-radius: 0 0 3px 0;
-moz-border-radius: 0 0 3px 0;
border-radius: 0 0 3px 0;
border-bottom: 0;
}
#cssmenu2 ul ul {
border-right: 2px solid black;
background:white;
margin-top:-2px;
}
#cssmenu2 ul ul {
margin-left:2px;
}
#cssmenu2 ul ul a {
font-size: 12px;
color: black;
}
#cssmenu2 ul ul a:hover {
color: black;
}
#cssmenu2 ul ul li {
}
#cssmenu2 ul ul li:hover > a {
background: black;
color: #ffffff;
}
#cssmenu2.align-right > ul > li > a {
border-left: 4px solid black;
border-right: none;
}
#cssmenu2.align-right {
float: right;
}
#cssmenu2.align-right li {
text-align: right;
}
#cssmenu2.align-right ul li.has-sub > a:after {
content: none;
}
#cssmenu2.align-right ul ul {
visibility: hidden;
position: absolute;
top: 0;
left: -100%;
z-index: 598;
width: 100%;
}
#cssmenu2.align-right ul ul li.first {
-webkit-border-radius: 3px 0 0 0;
-moz-border-radius: 3px 0 0 0;
border-radius: 3px 0 0 0;
}
#cssmenu2.align-right ul ul li.last {
-webkit-border-radius: 0 0 0 3px;
-moz-border-radius: 0 0 0 3px;
border-radius: 0 0 0 3px;
}
#cssmenu2.align-right ul ul {
-webkit-border-radius: 3px 0 0 3px;
-moz-border-radius: 3px 0 0 3px;
border-radius: 3px 0 0 3px;
}
/* ===========================
====== Contact Form ======
=========================== */
input, textarea {
padding: 10px;
border: 1px solid #E5E5E5;
width: 400px;
color: #999999;
box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 8px;
-moz-box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 8px;
-webkit-box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 8px;
}
textarea {
width: 400px;
height: 150px;
max-width: 400px;
line-height: 18px;
}
input:hover, textarea:hover,
input:focus, textarea:focus {
border-color: 1px solid #C9C9C9;
box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px;
-moz-box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px;
-webkit-box-shadow: rgba(0, 0, 0, 0.2) 0px 0px 8px;
}
.form label {
color: #999999;
}
/* Submit Button */
.submit input {
width: 100px;
height: 40px;
background-color: #474E69;
color: #FFF;
border-radius: 3px;
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
}
<div class='people'>
<div id='cssmenu'>
<ul>
<li class='active has-sub' id='fake'><a href='#'><span>A fake artist</span></a>
<ul>
<li class='has-sub'><a href='#'><span>Blog</span></a></li>
<li class='has-sub'><a href='#'><span>Facebook</span></a></li>
<li class='has-sub'><a href='#'><span>Instagram</span></a></li>
</ul>
</li>
<li class='active has-sub' id='danny'><a href='#'><span>Danny Rose Fashion</span></a>
<ul>
<li class='has-sub'><a href='#'><span>Blog</span></a></li>
<li class='has-sub'><a href='#'><span>Facebook</span></a></li>
<li class='has-sub'><a href='#'><span>Instagram</span></a></li>
</ul>
</li>
<li class='active has-sub' id='heels'><a href='#'><span>Heels in Prague</span></a>
<ul>
<li class='has-sub'><a href='#'><span>Blog</span></a></li>
<li class='has-sub'><a href='#'><span>Facebook</span></a></li>
<li class='has-sub'><a href='#'><span>Instagram</span></a></li>
</ul>
</li>
<li class='active has-sub' id='hodanajan'><a href='#'><span>Hodanajan</span></a>
<ul>
<li class='has-sub'><a href='#'><span>Blog</span></a></li>
<li class='has-sub'><a href='#'><span>Facebook</span></a></li>
<li class='has-sub'><a href='#'><span>Instagram</span></a></li>
</ul>
</li>
<li class='active has-sub' id='jakub'><a href='#'><span>Jakub Mařík</span></a>
<ul>
<li class='has-sub'><a href='#'><span>Web</span></a></li>
<li class='has-sub'><a href='#'><span>Facebook</span></a></li>
<li class='has-sub'><a href='#'><span>Instagram</span></a></li>
</ul>
</li>
</ul>
</div>
<div id='cssmenu2'>
<ul>
<li class='active has-sub' id='kaa'><a href='#'><span>Kaa Glo</span></a>
<ul>
<li class='has-sub'><a href='#'><span>Blog</span></a></li>
<li class='has-sub'><a href='#'><span>Facebook</span></a></li>
<li class='has-sub'><a href='#'><span>Instagram</span></a></li>
</ul>
</li>
<li class='active has-sub' id='pau'><a href='#'><span>Paulinemma</span></a>
<ul>
<li class='has-sub'><a href='#'><span>Blog</span></a></li>
<li class='has-sub'><a href='#'><span>Facebook</span></a></li>
<li class='has-sub'><a href='#'><span>Instagram</span></a></li>
</ul>
</li>
<li class='active has-sub' id='red'><a href='#'><span>Red Poppy Stories</span></a>
<ul>
<li class='has-sub'><a href='#'><span>Blog</span></a></li>
<li class='has-sub'><a href='#'><span>Facebook</span></a></li>
<li class='has-sub'><a href='#'><span>Instagram</span></a></li>
</ul>
</li>
<li class='active has-sub' id='kisic'><a href='#'>Sandra Kisic</a>
<ul>
<li class='has-sub'><a href='#'><span>Blog</span></a></li>
<li class='has-sub'><a href='#'><span>Facebook</span></a></li>
<li class='has-sub'><a href='#'><span>Instagram</span></a></li>
</ul>
</li>
<li class='active has-sub' id='aesthet'><a href='#'><span>The Aesthet</span></a>
<ul>
<li class='has-sub'><a href='#'><span>Blog</span></a></li>
<li class='has-sub'><a href='#'><span>Facebook</span></a></li>
<li class='has-sub'><a href='#'><span>Instagram</span></a></li>
</ul>
</li>
</ul>
</div>
Just try changing this class.. it will work.
#cssmenu ul ul {
margin-left: 113px;
text-align: right;
}
Let me know any issues