HTML css drop down menu - want to add vertical lines - html

I just want to add a vertical line between my categories and I don't know how.
Any ideas?
Here is the markup:
<style type="text/css">#import url(http://fonts.googleapis.com
/css?family=Open+Sans:600);/* Menu CSS */#cssmenu,#cssmenu > ul{background:transparent repeat;padding-bottom:3px;font-family:'Open Sans',sans-serif;font-weight:600}#cssmenu:before,#cssmenu:after,#cssmenu > ul:before,#cssmenu > ul:after{content:'';display:table}#cssmenu:after,#cssmenu > ||ul:after{clear:both}#cssmenu{width:auto;zoom:1}#cssmenu > ul{background:transparent repeat;margin:0;padding:0;position:relative}#cssmenu > ul li{margin:0;padding:0;list-style:none}#cssmenu > ul > li{float:left;position:relative}#cssmenu > ul > li > a{padding:23px 15px;display:block;color:white;font-size:13px;text-decoration:none;text-transform:capitalize;text-shadow:0 -1px 0 #9e3825;text-shadow:0 -1px 0 rgba(116,37,2,0.7);line-height:0px}#cssmenu > ul > li:hover > a{background:url(http://1.bp.blogspot.com/-efkMXp2H1cU/UjqSzHrMVFI/AAAAAAAABdI/TbVQZkLhC4I/s1600/hover.png) repeat;text-shadow:0 -1px 0 #97321f;text-shadow:0 -1px 0 rgba(122,42,26,0.64)}#cssmenu > ul > li > a > span{line-height:0px}#cssmenu > ul > li.active > a,#cssmenu > ul > li > a:active{background:url(http://1.bp.blogspot.com/-hKJMJ6tutvA/UjqSigUJTSI/AAAAAAAABdA/EicRvUY_mlw/s1600/active.png) repeat}/* Childs */#cssmenu > ul ul{opacity:0;visibility:hidden;position:absolute;top:120px;background:url(http://3.bp.blogspot.com/-V2tGyRV9wIY/UjqTVGOrmXI/AAAAAAAABdQ/XYS2v7U8DUI/s1600/highlight-bg.png) repeat;margin:0;padding:0;z-index:-1}#cssmenu > ul li:hover ul{opacity:1;visibility:visible;margin:0;color:#000;z-index:2;top:50px;left:0}#cssmenu > ul ul:before{content:'';position:absolute;top:-10px;width:100%;height:20px;background:transparent}#cssmenu > ul ul li{list-style:none;padding:0;margin:0;width:100%}#cssmenu > ul ul li a{padding:10px 23px;display:block;color:#393939;font-size:13px;text-decoration:none;text-transform:capitalize;width:150px;border-left:4px solid transparent;-webkit-transition:all 1.2s ease-in-out;-moz-transition:all 0.35s ease-in-out;-ms-transition:all 0.35s ease-in-out;transition:all 1.35s ease-in-out;text-shadow:0 1px 0 white}#cssmenu > ul ul li a:hover{border-left:4px solid #de553b;background:url(http://1.bp.blogspot.com/-efkMXp2H1cU/UjqSzHrMVFI/AAAAAAAABdI/TbVQZkLhC4I/s1600/hover.png) repeat;color:white;text-shadow:0 1px 0 black}#cssmenu > ul ul li a:active{background:url(http://1.bp.blogspot.com/-fPLR6IIW7dU/UjqTVZksJTI/AAAAAAAABdU/EadZ1JqTCX8/s1600/menu-bg.png) repeat}</style><img src="https://bitly.com/24workpng1" alt="Drop Down Menus" border="0" style="position: fixed; bottom: 10%; right: 0%; top: 0px;" /><img src="https://bitly.com/24workpng1" alt="CSS Drop Down Menu" border="0" style="position: fixed; bottom: 10%; right: 0%;" /><img src="https://bitly.com/24workpng1" alt="Pure CSS Dropdown Menu" border="0" style="position: fixed; bottom: 10%; left: 0%;" /><!-- Dont edit this CSS Drop Down Menu code or it will not work -->
<!-- customize your menus Links -->
<div id="cssmenu">
<ul>
<li class="active"><span>Αρχική</span></li>
<li class="has-sub"><span>Η Εταιρία</span>
<ul>
<li><span>Όραμα</span></li>
<li><span>Σημεία Συνεργασίας</span></li>
<li class="last"><a href="#"><span>Υποδομή</span>
</a></li>
<li><span>Δραστηριότητες</span></li>
<li><span>Σχετικά με εμένα</span></li>
</ul>
</li>
<li class="has-sub"><span>Ασφαλιστικά προϊόντα</span>
<ul>
<li><span>ΚΑΤΗΓΟΡΙΑ #1</span></li>
<li class="last"><span>ΚΑΤΗΓΟΡΙΑ #2</span></li>
</ul>
</li>
<li class="last"><span>Οι πελάτες μας</span></li>
<li class="last"><span>Καριέρα </span></li>
<li class="last"><span>Άρθρα</span></li>
<li class="last"><span>Φωτογραφίες</span></li>
<li class="last"><span>Επικοινωνία</span></li>
<li class="last"><span>Web Tv</span></li>
</ul>
</div>
Here is an example of what I am trying to do
http://lykourezoslawoffices.gr/

here is working code:
li {
float: left;
list-style-type: none;
border-left: 2px solid blue;
padding: 0 10px;
}
<ul>
<li>content</li>
<li>content</li>
<li>content</li>
<li>content</li>
</ul>
Demo:
https://jsfiddle.net/no5t2d9y/2/

Add a border-right style to your category, here's the sample working code
#cssmenu > ul > li {
border-right:2px solid #000;
}
#cssmenu > ul > li:last-child {
border-right:0px solid #000;
}

try this in css
.list li{ background:#ccc; position:relative; list-style:none; border-left:#666 solid 1px; padding:10px; }

Related

Bootstrap 4 Sidebar Menu Dropdown

I need to create a Bootstrap 4 Sidebar Menu Dropdown, as the below (image).
I'm think about use Dropright buttons, I looking for good exemples of code, but unsuccessfully...
Could any one give me a starting point? Or A funtional exemple of menu like that, with bootstrap?
Bootstrap 4 SideMenu bar with Dropdown:
Run and check out this in full page mode.
html, body {
margin:0;
padding:0;
height:100%;
}
* {box-sizing: border-box;}
.container {
height:100% !important;
margin: 0 !important;
padding: 0 !important;
}
a {
color:#fff !important;
text-decoration: none !important;
border-bottom:1px dotted #fff;
padding:0px 0px 20px 0px;
width:100%;
display:block;
height:100%;
}
li {
padding:20px 20px 0 20px;
width:100%;
list-style-type: none;
color:#fff;
}
.container ul {height:100%;}
.container > ul {
width:250px;
background-color:#225fe8;
position:relative;
padding:0 !important;
overflow:visible;
}
.container > ul > li {}
.container > ul > li:hover {background-color:#0f1e41;}
.container > ul > li > ul {
display:none;
position:absolute;
right:-250px;
top:0;
padding:0 !important;
width:250px;
background-color:#193d8e;
}
a:hover {
color: #fbfbfb !important;
}
i{
margin-top: 4px;
padding-left: 8px;
}
.container > ul > li:hover > ul {
display:block;
}
.container > ul > li > ul >li:hover {background-color:#0f1e41;}
.container > ul > li > ul > li > ul {
display:none;
position:absolute;
right:-250px;
padding:0 !important;
top:0;
width:250px;
background-color:#112551;
}
.container > ul > li > ul > li:hover ul {
display:block;
}
.container > ul > li > ul > li > ul > li:hover {background-color:#0f1e41;}
.container > ul > li > ul > li ul li ul li {
border-bottom:1px dotted #fff;
padding:20px;
}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<body>
<div class="container">
<ul class="">
<li class="">
<a tabindex="-1" href="#">HOME <i class="fa fa-angle-right" style="font-size:20px"></i>
</a>
<ul class="">
<li class=""><a tabindex="-1" href="#">Locations</a></li>
<li class="">Strategy</li>
<li class="">Research</li>
<li class="">
Products <i class="fa fa-angle-right" style="font-size:20px"></i>
<ul class="parent">
<li >
<a href="#">
Product List
</a>
<ul class="child">
<li >Platforms</li>
<li > Funds</li>
<li >Wealth</li>
<li >Listed </li>
<li >Wealth </li>
<li >Listed</li>
<li >Listed </li>
</ul>
</li>
<li >Model Portfolios</li>
<li >Non-approved Locations</li>
</ul>
</li>
<li class="">Implementation</li>
</ul>
</li>
<li >Contact</li>
<li >Address</li>
<li >News</li>
</ul>
</div>
<script type="text/javascript">
$('.child').hide();
$('.parent').children().click(function () {
event.preventDefault();
$(this).children('.child').slideToggle('slow');
$(this).find('span').toggle();
});
</script>
</body>
check it whether it is ok or not.
Below some ajustments that I did to reach something closer to the image posted.
Thank you #Amaresh S M!
Trash:
removed tabindex -1 from html
removed i tag from css
removed the the jquery script (not necessary in this case)
In order to have a menu of 4 parts (3 dynamic and 1 fixed):
container changed from .container to .container-fluid,
to have the full width
the original container was changed to a col-9 (75% of the width)
all the .container in css was changed to col-9
was added a fixed col-3 on right (the static part of menu, 25% of the width)
each of the three parts of the col-9 has width 33.33%
the unique .row has 100% of the height
Important:
I created classes for the columns col-9 and col-3. Associate CSS to generic classes is not a good idea! This can affect the entire website.
.row-menu-full-width {
height: 100%;
}
.dynamic-part {
margin: 0 !important;
padding: 0 !important;
background-color: black;
float: left;
}
a {
color:#fff !important;
text-decoration: none !important;
border-bottom:1px dotted #fff;
padding:0px 0px 0px 0px;
width:100%;
display:block;
}
li {
list-style-type: none;
color:#fff;
padding-left: 30px;
}
.dynamic-part > ul {
width:33.33%;
height: 100%;
background-color:#225fe8;
position:relative;
padding:0 !important;
overflow:visible;
}
.dynamic-part > ul > li:hover {background-color:#0f1e41;}
.dynamic-part > ul > li > ul {
display:none;
position:absolute;
right:-100%;
top:0;
padding:0 !important;
width:100%;
background-color:#193d8e;
height: 100%;
}
a:hover {
color: #fbfbfb !important;
}
.dynamic-part > ul > li:hover > ul {
display:block;
}
.dynamic-part > ul > li > ul >li:hover {background-color:#0f1e41;}
.dynamic-part > ul > li > ul > li > ul {
display:none;
position:absolute;
right:-100%;
padding:0 !important;
top:0;
width:100%;
background-color:#112551;
height: 100%
}
.dynamic-part > ul > li > ul > li:hover ul {
display:block;
}
.dynamic-part > ul > li > ul > li > ul > li:hover {background-color:#0f1e41;}
.dynamic-part > ul > li > ul > li ul li ul li {
border-bottom:1px dotted #fff;
}
.static-part {
margin: 0 !important;
padding: 0 !important;
background-color: lightgray;
float: right;
}
<body>
<div class="container-fluid container-menu-full width">
<div class="row row-menu-full-width">
<div class="col-9 dynamic-part">
<ul class="">
<li class="">
HOME<i class="fa fa-angle-right" style="font-size:20px"></i>
<ul class="">
<li class="">Locations</li>
<li class="">Strategy</li>
<li class="">Research</li>
<li class="">
Products <i class="fa fa-angle-right" style="font-size:20px"></i>
<ul class="">
<li>
<a href="#">
Product List
</a>
</li>
<li>
<a href="#">
Product List
</a>
</li>
<li >Model Portfolios</li>
<li >Non-approved Locations</li>
</ul>
</li>
<li class="">Implementation</li>
</ul>
</li>
<li >Contact</li>
<li >Address</li>
<li >News</li>
</ul>
</div>
<div class="col-3 static-part">
fixed column
</div>
</div>
</div>
</body>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet"/>

Putting two <ul>'s next to each other

I'm having some trouble with putting two ul's next to each other.
div.container > nav > ul > li > div {
width: 100%;
margin-top: 13px;
padding: 25px;
position: absolute;
border-bottom: 1px #222222 solid;
background-color: #ffffff;
}
div.container > nav > ul > li > div > ul {
width: 200px;
border-left: 2px #555555 solid;
}
div.container > nav > ul > li > div > ul > li {
padding: 3px;
}
div.container > nav > ul > li > div > h4 {
width: 242px;
color: #d60000;
}
div.container > nav > ul > li > div > ul > li > a {
text-decoration: none;
color: #222222;
font-size: 12px;
}
div.container > nav > ul > li > div > ul > li > a:hover {
color: #d60000;
}
<div>
<h4>Website</h4>
<ul>
<li>
<a href=''>Basic</a>
</li>
<li>
<a href=''>Premium</a>
</li>
<li>
<a href=''>Without Hosting</a>
</li>
<li>
<a href=''>Without Database</a>
</li>
<li>
<a href=''>Multiple Website's</a>
</li>
</ul>
<h4>Hosting</h4>
<ul>
<li>
<a href=''>Hosting</a>
</li>
<li>
<a href=''>Host a personal site</a>
</li>
<li>
<a href=''>Host an existing website</a>
</li>
</ul>
</div>
The problem that I'm getting now is that the <ul>'s drop down under each other, where I like them to be inline.
Has anyone a proper solution for the problem. I searched through other's questions about this topic, all methods did not work.
1 method:
you need 2 div
<div>
<h4>Website</h4>
<ul>
<li>
<a href=''>Basic</a>
</li>
<li>
<a href=''>Premium</a>
</li>
</ul>
</div>
<div>
<h4>Hosting</h4>
<ul>
<li>
<a href=''>Hosting</a>
</li>
<li>
<a href=''>Host a personal site</a>
</li>
</ul>
</div>
Css
div {
display:inline-block;
float:left;
}
Example: https://jsfiddle.net/d2q6kbnw/
2nd method, make your h and ul tag into inline tag using css...
display:inline-block; float:left;
Wrap each ul into a parent div and apply display: inline-block; and vertical-align: top; to them.
Here's a Fiddle to demonstrate.
You can wrap the headling/list groups in a div and float them left:
div.container > nav > ul > li > div {
width: 100%;
margin-top: 13px;
padding: 25px;
position: absolute;
border-bottom: 1px #222222 solid;
background-color: #ffffff;
}
div.container > nav > ul > li > div > ul {
width: 200px;
border-left: 2px #555555 solid;
}
div.container > nav > ul > li > div > ul > li {
padding: 3px;
}
div.container > nav > ul > li > div > h4 {
width: 242px;
color: #d60000;
}
div.container > nav > ul > li > div > ul > li > a {
text-decoration: none;
color: #222222;
font-size: 12px;
}
div.container > nav > ul > li > div > ul > li > a:hover {
color: #d60000;
}
.wrapper {
float: left;
}
<div>
<div class="wrapper">
<h4>Website</h4>
<ul>
<li>
<a href=''>Basic</a>
</li>
<li>
<a href=''>Premium</a>
</li>
<li>
<a href=''>Without Hosting</a>
</li>
<li>
<a href=''>Without Database</a>
</li>
<li>
<a href=''>Multiple Website's</a>
</li>
</ul>
</div>
<div class="wrapper">
<h4>Hosting</h4>
<ul>
<li>
<a href=''>Hosting</a>
</li>
<li>
<a href=''>Host a personal site</a>
</li>
<li>
<a href=''>Host an existing website</a>
</li>
</ul>
</div>
</div>
You create 2 div "left" and "right" :
<div class="left">
<h4>title</h4>
<ul>...<ul>
</div>
<div class="right">
<h4>title</h4>
<ul>...<ul>
</div>
.left,
.right{
display: inline-block;
vertical-align: top;
}
fiddle
You can do this:
CSS
div.container > nav > ul > li > div {
width: 100%;
margin-top: 13px;
padding: 25px;
position: absolute;
border-bottom: 1px #222222 solid;
background-color: #ffffff;
}
div.container > nav > ul > li > div > ul {
width: 200px;
border-left: 2px #555555 solid;
}
div.container > nav > ul > li > div > ul > li {
padding: 3px;
}
div.container > nav > ul > li > div > h4 {
width: 242px;
color: #d60000;
}
div.container > nav > ul > li > div > ul > li > a {
text-decoration: none;
color: #222222;
font-size: 12px;
}
div.container > nav > ul > li > div > ul > li > a:hover {
color: #d60000;
}
div ul{
display: inline-block;
vertical-align: top;
}
HTML
<div>
<ul>
<h4>Website</h4>
<li>
<a href=''>Basic</a>
</li>
<li>
<a href=''>Premium</a>
</li>
<li>
<a href=''>Without Hosting</a>
</li>
<li>
<a href=''>Without Database</a>
</li>
<li>
<a href=''>Multiple Website's</a>
</li>
</ul>
<ul>
<h4>Hosting</h4>
<li>
<a href=''>Hosting</a>
</li>
<li>
<a href=''>Host a personal site</a>
</li>
<li>
<a href=''>Host an existing website</a>
</li>
</ul>
</div>
DEMO HERE
The issue is that the h4 tags are block level elements. You would need to two wrap both lists in some sort of column div like so for the desired behavior:
div.container > nav > ul > li > div {
width: 100%;
margin-top: 13px;
padding: 25px;
position: absolute;
border-bottom: 1px #222222 solid;
background-color: #ffffff;
}
div.container > nav > ul > li > div > ul {
width: 200px;
border-left: 2px #555555 solid;
}
div.container > nav > ul > li > div > ul > li {
padding: 3px;
}
div.container > nav > ul > li > div > h4 {
width: 242px;
color: #d60000;
}
div.container > nav > ul > li > div > ul > li > a {
text-decoration: none;
color: #222222;
font-size: 12px;
}
div.container > nav > ul > li > div > ul > li > a:hover {
color: #d60000;
}
div.column {
display: inline-block;
float: left;
}
<div>
<div class="column">
<h4>Website</h4>
<ul>
<li>
<a href=''>Basic</a>
</li>
<li>
<a href=''>Premium</a>
</li>
<li>
<a href=''>Without Hosting</a>
</li>
<li>
<a href=''>Without Database</a>
</li>
<li>
<a href=''>Multiple Website's</a>
</li>
</ul>
</div>
<div class="column">
<h4>Hosting</h4>
<ul>
<li>
<a href=''>Hosting</a>
</li>
<li>
<a href=''>Host a personal site</a>
</li>
<li>
<a href=''>Host an existing website</a>
</li>
</ul>
</div>
</div>

Child level <ul> height issue

I know it'll be sillest Question ever!!, but having a Query regarding the height of sub level <ul>, i am not getting the full height of child tag.
<div class="nav megaMenu">
<ul>
<li>Home</li>
<li>About Us
<ul class="sub-nav" >
<li class="sub-nav-col" >About us A
<ul class="sub-inner">
<li>About us A 1</li>
<li>About us A 2</li>
<li>About us A 3</li>
</ul>
</li>
</ul>
</li>
<li>Clients
<ul>
<li>Links A
<ul>
<li>Links C 1</li>
</ul>
</li>
<li>Links B
<ul>
<li>Links B 1</li>
<li>Links B 2</li>
</ul>
</li>
</ul>
</li>
<li>Contact Us
<ul>
<li>level-2</li>
<li>level-2</li>
<li>level-2</li>
</ul>
</li>
</ul>
</div>
CSS:
.nav {
float: left;
width: 100%;
}
.nav ul{
display:table;
margin: 0 auto;
max-width: 1024px;
width: 100%;
}
.nav > ul > li.level1{
position:static;
}
.nav ul li {
display: table-cell;
transition: all 0.5s ease 0s;
position: relative;
}
.nav li a {
transition: all 0.5s ease 0s;
display:block;
}
.nav > ul > li > a {
background: #f5f5f5;
border-right: 1px solid #000;
box-sizing: border-box;
display: block;
padding: 10px;
}
.nav > ul > li:last-child > a {
border-right: none;
}
.nav {
position: relative;
}
.nav.megaMenu > ul > li > ul{
left: 0;
position: absolute;
right: 0;
width: 100%;
z-index:9;
height:100%;
background:red;
}
.nav.megaMenu > ul {
position: relative;
margin: 0 auto;
max-width: 1024px;
}
.nav.megaMenu li.level2 ul li {
width:100%;
}
.nav.megaMenu > ul li:hover ul {
visibility:visible;
}
.nav > ul > li ul {
visibility:hidden;
z-index: 9;
position: absolute;
}
.nav > ul > li.level1 ul li a {
background: rgba(0, 0, 0, 0.2);
border-bottom: 1px solid #000;
box-sizing: border-box;
color: #fff;
display: block;
margin-right: 1px;
padding: 10px;
}
you can get the working demo # here. at here when you hover on menu, you will find the red background coloured <ul> which contains sub children too, but the height of <ul> is not covering the height of full heirarchy. please help me for this!
Remove the absolute parent on child ul since the parent is already in absolute position.
.nav > ul > li ul {
visibility:hidden;
z-index: 9;
}
Demo: fiddle

How to create dropdown navigationbar without float?

How to create dropdown navigationbar without using float?? I tried but I am little bit far from my answer, My code is as below ##
HTML
<div id="nav">
<ul>
<li>Animals</li>
<li>Birds</li>
<li>Vegetables
<ul>
<li>Okra</li>
<li>Runner Beans</li>
<li>Pumkin</li>
</ul>
</li>
<li>Fruits
<ul>
<li>Apple</li>
<li>Banana</li>
<li>Orange</li>
<li>Lemom</li>
</ul>
</li>
</ul>
CSS
#nav{width:100%;}
#nav ul{list-style-type:none; margin:0; padding:0; background-color:#9900CC;}
#nav ul li{display:inline;}
#nav ul li a{color:#ffffff; text-decoration:none; display:inline-block; padding:15px; font-weight:700;}
#nav ul li a:hover{background-color:#5F6975;}
#nav ul ul{position:absolute; background:#5F6975; display:none;}
#nav ul li:hover > ul{display:block;}
#nav li ul li{display:block;}
Please help me....
You can use positioning and inline-block:
* {margin: 0; padding: 0; list-style: none;}
a {text-decoration: none;}
#nav > ul > li {display: inline-block; position: relative; width: 100px; padding: 5px;}
#nav > ul > li ul {position: absolute; display: none;}
#nav > ul > li:hover ul {display: block; border: 1px solid #ccc; width: 100px; padding: 5px;}
#nav a {display: block;}
<div id="nav">
<ul>
<li>Animals</li>
<li>Birds</li>
<li>Vegetables
<ul>
<li>Okra</li>
<li>Runner Beans</li>
<li>Pumkin</li>
</ul>
</li>
<li>Fruits
<ul>
<li>Apple</li>
<li>Banana</li>
<li>Orange</li>
<li>Lemom</li>
</ul>
</li>
</ul>
</div>

Accessible HTML5/CSS3 dropdown menu without Javascript

I have created a dropdown menu using pure css, which works fine with a mouse, but I would like to make it more accessible via the keyboard. I don't want to use Javascript to do this.
Here is a snippet of the html code, and a jsfiddle:
<nav>
<ul>
<li>Home</li>
<li>About us »
<ul>
<li>Option 1</li>
<li>Option 2</li>
<li>Option 3</li>
<li>Option 4</li>
<li>Option 5</li>
</ul>
</li>
</ul>
</nav>
And here is the CSS:
BODY {
font-family : Arial, Helvetica, Swiss, Geneva, Sans-serif;
font-size: 0.8em;
width: 795px;
margin: 0px auto;
padding: 0px;
}
nav ul ul {
display: none;
}
nav ul li:hover > ul, nav ul li:focus > ul, nav ul li:active > ul {
display: block;
}
nav ul {
background: #696969;
padding: 0px 0px;
list-style: none;
position: relative;
display: inline-table;
}
nav ul:after {
content: "";
clear: both;
display: block;
}
nav ul li {
float: left;
border-bottom: 1px solid #FFF;
}
nav ul li:hover, nav ul li:focus, nav ul li:active {
background: #F8A509;
}
nav ul li:hover a, nav ul li:focus a, nav ul li:active a {
color: #fff;
}
nav ul li a {
display: block;
padding: 4px 14px;
color: #fff;
text-decoration: none;
}
nav ul ul {
background: #BDD575;
padding: 0px;
position: absolute;
top: 100%;
-moz-box-shadow: 2px 2px 4px 0px rgba(0,0,0,0.20);
-webkit-box-shadow: 2px 2px 4px 0px rgba(0,0,0,0.20);
box-shadow: 2px 2px 4px 0px rgba(0,0,0,0.20);
}
nav ul ul li {
float: none;
border-bottom: 1px solid #FFF;
position: relative;
}
nav ul ul li a {
padding: 4px 14px;
color: #fff;
white-space: nowrap;
border-right: 1px solid #FFF;
}
nav ul ul li a:hover, nav ul ul li a:focus, nav ul ul li a:active {
background: #9ED112;
color: #fff;
}
nav ul ul ul {
position: absolute; left: 100%; top:0;
}
Any ideas where I am going wrong?
TIA for any helpful advice.
The W3C's draft specification for Accessible Rich Internet Applications (WAI-ARIA) makes it possible to supplement HTML with attributes that explicitly communicate the roles, states, and properties of the various parts that make up a menu system. As assistive technology (AT) users interact with the menu, ARIA passes updated information to their AT, and their AT then communicates that information in meaningful ways.
See more about on Accessible Dropdown Menus
Working Demo
Markup
<nav role="navigation" aria-label="Main menu">
<ul id="nav" role="menubar" aria-hidden="false">
<li role="menuitem" aria-haspopup="false">Home</li>
<li tabindex="0" aria-haspopup="true">About us »
<ul data-test="true" role="menu" aria-hidden="true">
<li role="menuitem">Option 1</li>
<li role="menuitem">Option 2</li>
<li role="menuitem">Option 3</li>
<li role="menuitem">Option 4</li>
<li role="menuitem">Option 5</li>
</ul>
</li>
</ul>
</nav>