The issue here being that I would like all of the elements from the list to be right below eachother instead of there being a space, and I don't want every li to pop-up when you move over 1 button, just the ones corresponding to each other.
CSS:
#uphead {list-style: none; font-weight: bold; font-size: 15px; padding: 5px 0px;}
#partnumbers {list-style-type: none;}
#partnumbers a {padding: 2px 10px; width: 220px; display:block;}
#partnumbers li {list-style-type: none; float: left; width: 220px;}
#partnumbers li ul {position: relative; padding: 10px 0px 10px 0px; float:left; z-index:20;}
#pn {display: none; background: url('../../../images/pn_box.png'); background-repeat: no-repeat; background-size: 200px 40px; height: 40px; width: 150px; position: relative; z-index: 20; margin: -40px 225px;}
#partnumbers:hover li ul li{display: block; padding: 10px 30px 0px; position: relative; z-index: 500; opacity: 0.9;}
.odd {background:#f4f3f0;}
.even {background:#eae9e6;}
HTML:
<div id="underpic">
<ul id="uphead">
<li>
iPhone 4 & 4s</li>
</ul>
<ul id="partnumbers">
<li>
<a class="even">MSR</a>
<ul>
<li id="pn">
LP4MS - PH4</li>
</ul>
</li>
<li>
<a class="odd">MSR, 1D Scanner</a>
<ul>
<li id="pn">
LP4 - PH4</li>
</ul>
</li>
<li>
<a class="even">MSR, 1D Scanner with Bluetooth</a>
<ul>
<li id="pn">
LP4BT - PH4</li>
</ul>
</li>
<li>
<a class="odd">MSR, 2D Code Scanner</a>
<ul>
<li id="pn">
LP4C2D - PH4</li>
</ul>
</li>
<li>
<a class="even">MSR, 2D Code Scanner with Bluetooth</a>
<ul>
<li id="pn">
LP4C2DBT - PH4</li>
</ul>
</li>
</ul>
Fix 1: Remove padding from #partnumbers li ul
Fix 2: Change #partnumbers:hover li ul li to #partnumbers li:hover ul li
I'll try and copy most of the styles I played with, but I might miss some, also I'm only using the firefox specific prefixes, you need to add all the browser prefixes you want to support:
#partnumbers {
list-style-type: none;
}
#partnumbers > li {
list-style-type: none;
position: relative;
width: 220px;
border: 1px solid #CECDCB;
}
#partnumbers a {
-moz-box-sizing: border-box;
box-sizing: border-box;
display: block;
padding: 2px 10px;
width: 100%;
}
#partnumbers li ul {
bottom: 0;
position: absolute;
right: 100%;
top: -7px;
z-index: 20;
}
#partnumbers li:hover ul li {
display: block;
opacity: 0.9;
padding: 10px 20px 10px 10px;
position: relative;
z-index: 500;
}
#pn {
background: url("http://www.metsales.com/MetropolitanSales/microsite/ipc/images/pn_box.png") no-repeat scroll 0 0 / 100% 100% transparent;
display: none;
position: relative;
white-space: nowrap;
z-index: 20;
}
This should be the CSS code...
#uphead {list-style: none; font-weight: bold; font-size: 15px; padding: 5px 0px;}
#partnumbers {list-style-type: none;}
#partnumbers a {padding: 2px 10px; width: 220px; display:block;}
#partnumbers li {list-style-type: none; float: left; width: 220px;}
#partnumbers li ul {position: relative; float:left; z-index:20;}
#pn {display: none; background: url('../../../images/pn_box.png'); background-repeat: no-repeat; background-size: 200px 40px; height: 40px; width: 150px; position: relative; z-index: 20; margin: -40px 225px;}
#partnumbers li:hover ul li{display: block; padding: 10px 30px 0px; position: relative; z-index: 500; opacity: 0.9;}
.odd {background:#f4f3f0;}
.even {background:#eae9e6;}
Related
My navigation bar doesn't work in Firefox. You can't click on any of the child items. I apologize if I'm putting too much code here, but I really don't know what's causing the issue. I've removed as much of the trivial stuff as I could.
#navbar {
width: 100%;
border-top: 1px solid #879478;
height: 35px;
}
#navigation {
width: 1000px;
margin-left: auto;
margin-right: auto;
margin-top: -10px !important;
}
#nav {
float: left;
width: 1000px;
height: 35px;
list-style: none;
}
#nav a {
text-indent: 0;
display: inline-block;
margin-top: -1px !important;
font-weight: normal;
border: 1px solid transparent;
font-style: normal;
height: 35px;
line-height: 35px;
text-decoration: none;
text-align: center;
}
#nav ul {
position: absolute;
list-style: none;
display: inline-table;
margin-top: 1px !important;
height: 35px;
}
#nav li:hover > ul {
display: block;
}
#nav li {
float: left;
}
#nav ul {
display: none;
}
#nav ul a {
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
display: inline-block;
width: inherit;
text-align: center;
display: block;
font-weight: normal;
}
#nav ul {
padding: 0px;
z-index: 100 !important;
}
#nav ul li {
float: none;
}
#nav ul ul {
width: 141px !important;
padding-top: 1px !important;
border-top: 1px solid #6f8059 !important;
position: absolute;
margin-top: -38px !important;
left: 100%;
margin-left: 1px;
z-index: 100 !important;
}
<div id="navbar">
<div id="navigation">
<ul id="nav">
<li><a style="width: 150px !important;">subject 1</a>
<ul>
<li>child 1
</li>
<li>child 2
</li>
</ul>
</li>
</ul>
</div>
</div>
As #Nitin Garg said, #nav ul { display: none; } line is hidding child elements.
However, if you want to show childs element on parent li hover, you have to add this line :
#nav li:hover ul {display: block; }
Can someone help me what is wrong with my code why the "admin's" tab drop down menu does not stay on place where it should be. It should be below the admin tab, however when you put the mouse on the admin tab the drop down goes on the tab beside the admin. I tried to designate an id for the admin's ul however, nothing works. Stays the same. Thank you very much!!
HTML code
<div id="navbar">
<ul>
<li> Home</li>
<li> About us</li>
<li> Games
<ul>
<li> All Games</li>
<li> Outdoor Games</li>
<li> Indoor Games</li>
<li> Games in Groups </li>
<li> Games in Pair</li>
</ul>
</li>
<li>Admin
<ul id="list">
<li>Add entry</li>
<li>Passwor request / suggestions</li>
</ul>
</li>
<li> Contact us</li>
<li> Log out</li>
</ul>
</div>
CSS code:
/*CSS Naigation Bar*/
#navbar {
width: 100%;
height: 100%; }
#navbar ul {
width: 90%;
position: fixed;
list-style: none;
padding: 0;
margin: 0;
top: 0;
left: 12.5%;
right: 0;
z-index: 1;}
#navbar ul li {
background-color: black;
opacity: 0.7;
float: left;
height: 25%;
width: 16.5%;
padding: 0;
margin: 0;
font-family: Arial;
font-weight: bold;
font-size: 16.5px;
text-align: center;
line-height: 20px;}
#navbar ul li a {
display: block;
padding: 7% 10%;
text-decoration: none;
color: #E4E4E4;}
#navbar ul li a:hover {
background-color: transparent;
color: white;
text-shadow: 0px 0px 2px white, 0px 0px 2px white, 0px 0px 2px white;}
#navbar ul li ul {
list-style: none;
width: 20%;
padding: 0;
margin: 0;
position: absolute;
display: none;
top: 100%;
left: 32%;
right: 40%;
z-index: 1;}
#navbar ul li ul li {
width: 100%;
float: none;
background-color: black;
opacity: 10;
text-align: center;}
#navbar ul li:hover ul {
display: block;}
#navbar ul li ul #list{
list-style: none;
width: 20%;
padding: 0;
margin: 0;
position: absolute;
display: none;
top: 100%;
left: 50%;
right: 40%;
z-index: 1;}
/*end*/
Add position: relative to the parent list item.
#navbar ul li {
position: relative;
}
And you might want to add a width to the child list item, so it is readable.
#navbar ul li ul li {
width: 150px; /* for example */
}
Think that was your issue? Here's the fiddle I created
Remove list id; you don't need it; and replace this one css :
#navbar ul li ul {
list-style: none;
width: 100%;
padding: 0;
margin: 0;
position: relative;
display: none;
top: 100%;
left: 0;
right: 0;
z-index: 1;
}
Remove left right from #navbar ul li ul
add top padding to #navbar ul li ul
Set width 100% #navbar ul li ul
add position relative to #navbar ul li
#navbar ul li {
background-color: black;
opacity: 0.7;
float: left;
height: 25%;
width: 16.5%;
padding: 0;
margin: 0;
font-family: Arial;
font-weight: bold;
font-size: 16.5px;
text-align: center;
line-height: 20px;
position:relative;}
#navbar ul li ul {
list-style: none;
width: 100%;
padding: 0;
margin: 0;
padding-top:10px;
position: absolute;
display: none;
top: 100%;
z-index: 1;}
Fiddle:
http://jsfiddle.net/f3sokdxt/
refer https://jsfiddle.net/95rqykjx/
CSS changes are follows,
#navbar ul li ul, remove width: 20%; and left: 32%;
#navbar ul li add position: relative;
Add position: relative to #navbar ul li and
left: 0; width: 100%; to #navbar ul li ul
Hope this will solve your problem.
#navbar {
width: 100%;
height: 100%;
}
#navbar ul {
width: 90%;
position: fixed;
list-style: none;
padding: 0;
margin: 0;
top: 0;
left: 12.5%;
right: 0;
z-index: 1;
}
#navbar ul li {
background-color: black;
opacity: 0.7;
float: left;
height: 25%;
width: 16.5%;
padding: 0;
margin: 0;
font-family: Arial;
font-weight: bold;
font-size: 16.5px;
text-align: center;
line-height: 20px;
position: relative;
}
#navbar ul li a {
display: block;
padding: 7% 10%;
text-decoration: none;
color: #E4E4E4;
}
#navbar ul li a:hover {
background-color: transparent;
color: white;
text-shadow: 0px 0px 2px white, 0px 0px 2px white, 0px 0px 2px white;
}
#navbar ul li ul {
list-style: none;
width: 100%;
padding: 0;
margin: 0;
position: absolute;
display: none;
top: 100%;
left: 0;
right: 40%;
z-index: 1;
}
#navbar ul li ul li {
width: 100%;
float: none;
background-color: black;
opacity: 10;
text-align: center;
}
#navbar ul li:hover ul {
display: block;
}
#navbar ul li ul #list {
list-style: none;
width: 20%;
padding: 0;
margin: 0;
position: absolute;
display: none;
top: 100%;
left: 50%;
right: 40%;
z-index: 1;
}
<div id="navbar">
<ul>
<li> Home</li>
<li> About us</li>
<li>
Games
<ul>
<li> All Games</li>
<li> Outdoor Games</li>
<li> Indoor Games</li>
<li> Games in Groups </li>
<li> Games in Pair</li>
</ul>
</li>
<li>
Admin
<ul id="list">
<li>Add entry</li>
<li>Passwor request / suggestions</li>
</ul>
</li>
<li> Contact us</li>
<li> Log out</li>
</ul>
</div>
In my blog (http://www.khyberacademy.blogspot.com), the dropdown menu is not working. Please guide me. The HTML & CSS codes are given below.
On hover it doesn't drop down and also I have tried to change the display to block & inline, but it didn't solve my problem.
HTML:
<!-- begin #topMenu -->
<div class='clearfix' id='navigation-wrapper'>
<select id='responsive-main-nav-menu' onchange='javascript:window.location.replace(this.value);'><option selected='selected'>Menu</option></select>
<nav class='main-menu' id='main-navigation'>
<ul class='sf-menu' id='menu-top-menu'>
<li>
<a href='#' style='padding-right: 23px;'>Engineering<span class='downarrowclass'/></a>
<ul class='sub-menu' style='top: 127px; visibility: visible; left: 0px; width: 175px; display: none;'>
<li><a href='http://khyberacademy.blogspot.com/search/label/Bridge%20Engineering'>Bridge Engineering</a></li>
<li><a href='http://khyberacademy.blogspot.com/search/label/Pre-stressed%20Concrete'>Pre-stressed Concrete</a></li>
<li><a href='http://khyberacademy.blogspot.com/search/label/CAD%2FCAM'>CAD/CAM</a></li>
</ul>
</li>
<li>
<a href='#' style='padding-right: 23px;'>COMMERCE<span class='downarrowclass'/></a>
<ul class='sub-menu' style='top: 127px; visibility: visible; display: none;'>
<li><a href='http://khyberacademy.blogspot.com/search/label/AUDITING'>AUDITING</a></li>
<li><a href='http://khyberacademy.blogspot.com/search/label/Business%20Communication'>BUSINESS COMMUNICATION</a></li>
<li><a href='http://khyberacademy.blogspot.com/search/label/ECONOMICS'>ECONOMICS</a></li>
<li><a href='http://khyberacademy.blogspot.com/search/label/STATISTICS'>STATISTIC</a></li>
</ul>
</li>
<li>
<a href='#' style='padding-right: 23px;'>COMPUTER<span class='downarrowclass'/></a>
<ul class='sub-menu' style='top: 127px; visibility: visible; display: none;'>
<li><a href='http://khyberacademy.blogspot.com/search/label/Joomla%21'>JOOMLA</a></li>
<li><a href='http://khyberacademy.blogspot.com/search/label/Windows%20Tricks'>WINDOWS TRICKS</a></li>
<li><a href='#'>WORDPRESS</a></li>
<li><a href='#'>BLOGGING</a></li>
</ul>
</li>
<li>
<a href='#' style='padding-right: 23px;'>GRAPHICS<span class='downarrowclass'/></a>
<ul class='sub-menu' style='top: 127px; visibility: visible; display: none;'>
<li><a href='http://khyberacademy.blogspot.com/search/label/CAD%2FCAM'>CAD/CAM</a></li>
</ul>
</li>
<li>
<a href='http://khyberacademy.blogspot.com/p/contact-us.html'>Contact</a>
</li>
</ul>
</nav>
</div>
<!-- end #topMenu -->
CSS:
/* -------------------------------------------------- */
/* MAVIGATION
/* -------------------------------------------------- */
.downarrowclass {
position: absolute;
top: 53px;
right: 5px;
}
.rightarrowclass {
position: absolute;
top: 10px;
right: 10px;
}
#main-navigation select { display: none }
#main-navigation { float: right }
#main-navigation > ul { margin: -30px 0 0 0px }
#main-navigation ul li {
list-style: none;
float: left;
position: relative;
}
#main-navigation li a {
color: #898989;
font-family: 'Dosis', 'Verdana', sans-serif;
font-size: 16px;
font-weight: normal;
padding: 47px 12px 50px 12px;
margin: 0px 0px 10px 0;
position: relative;
text-align: center;
text-transform: uppercase;
float: left;
overflow: hidden;
line-height: 20px;
}
#main-navigation ul li a:hover,
#main-navigation ul li.current-menu-ancestor > a,
#main-navigation ul li.current-menu-item > a {
color: #9dcedf;
background: #f8f8f8;
border-bottom: 1pt solid #9dcedf;
}
#main-navigation ul ul li a {
display: block;
float: none;
}
#main-navigation ul ul {
background: url("http://1.bp.blogspot.com/-iIDMdP-Ub9I/UkEjY7k9a5I/AAAAAAAAJ-0/ZWPPe0dkcoA/s1600/menu-drop-bg.png") 20% 0% no-repeat;
padding-top: 8px;
display: none;
left: 0;
margin-top: -18px;
position: absolute;
width: 175px;
z-index: 99;
border-radius: 2px;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
}
#main-navigation ul ul ul {
background: url("http://1.bp.blogspot.com/-3LBiTw7Ht0U/UkEjYHu05eI/AAAAAAAAJ-k/pCHPYKrpKak/s1600/menu-drop-bg-2.png") 0% 50% no-repeat;
padding-left: 8px;
display: none;
left: 0;
position: absolute;
width: 175px;
z-index: 99;
border-radius: 2px;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
}
#main-navigation ul ul ul ul {
background: url("http://1.bp.blogspot.com/-3LBiTw7Ht0U/UkEjYHu05eI/AAAAAAAAJ-k/pCHPYKrpKak/s1600/menu-drop-bg-2.png") 0% 50% no-repeat;
padding-left: 8px;
display: none;
margin-left: 10px;
left: 0;
position: absolute;
width: 175px;
z-index: 99;
border-radius: 2px;
-moz-border-radius: 2px;
-webkit-border-radius: 2px;
}
#main-navigation ul ul li,
#main-navigation ul ul li a {
padding: 0px 0 0 0px;
margin: 0px;
color: #FFF;
background: #615951;
font-family: "Arial", "Verdana";
}
#main-navigation ul ul li { }
#main-navigation ul ul li { float: none }
#main-navigation ul li {
padding: 0;
margin: 0 0 0 20px;
}
#main-navigation ul ul a {
border: 0;
color: #fff;
display: block;
font-size: 11px;
font-weight: 400;
padding: 5px 10px !important;
text-align: left;
margin: 0;
text-transform: none;
}
#main-navigation ul ul a:hover,
#main-navigation ul ul .hover > a,
#main-navigation ul ul .current-menu-item > a,
#main-navigation ul ul .current-menu-item > a:hover {
background: #9dcedf ;
color: #fff !important;
border: 0 !important;
}
#main-navigation ul li ul {
position: absolute;
left: 0px;
display: block;
visibility: hidden;
margin-left: 0px;
top: 0;
}
.downarrowclass,
.rightarrowclass {
width:8px;
height:8px;
background:url(http://2.bp.blogspot.com/-bkf-TLVpTn4/UkEjaEMyKaI/AAAAAAAAJ_E/dyM2NDVqNNo/s1600/plus.png) top left no-repeat;
display:inline-block;
position: absolute;
right: 5px;
top: 53px
}
.rightarrowclass {
background-image:url(http://3.bp.blogspot.com/-ivF1y3GR6rw/UkEjZ8YMXlI/AAAAAAAAJ-8/xCB_X7XVIbw/s1600/plus-white.png);
}
Just Add this class, it will work well.
Hopefully, this will resolve your issue.
#main-navigation ul li:hover ul{display:block!important;}
Remove display:none in every "ul"
and set visiblity:none. Then add below Javascript code.
$("ul").hover(function(){
$(this).css("visibility", "visibile");
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.2.3/jquery.min.js"></script>
It's a nav menu with ULs nested in a parent UL. When hovering over an LI of the parent UL (orange in the image below), the nested UL (green in the image below_ should display right below the LI.
Here is the fiddle
.clearer {
clear: both;
}
body {
font-family: sans-serif;
font-size: 13px;
margin: 0;
padding: 0;
position: relative;
vertical-align: baseline;
}
div#header {
background: none repeat scroll 0 0 #101816;
float: left;
height: 56px;
margin: 0;
padding: 0;
width: 320px;
}
div#header-content-container {
height: 100%;
margin: 0;
padding: 0;
width: 320px;
}
a#logo {
background: blue;
background-image: none;
box-shadow: none;
float: left;
height: 38px;
margin: 9px 0 0 6px;
width: 238px;
}
#top-nav-container {
margin: 0 0 0 264px;
position: absolute !important;
}
nav {
background-color: #3e4f4c;
height: 56px;
margin: 0;
width: 56px;
}
nav a#menu_button {
background: #3e4f4c;
display: block;
font-size: 30px;
height: 56px;
margin: 0;
padding: 0;
text-align: center;
width: 56px;
}
nav ul {
background: black repeat-y scroll 0 0 transparent;
border-radius: 0;
box-shadow: none;
display: block;
left: -184px;
list-style: outside none none;
margin: 0;
padding: 0;
position: absolute !important;
width: 240px;
}
nav ul li:first-child {
border-top: medium none;
}
nav ul li:last-child {
border-bottom: medium none;
}
nav ul li:last-child:hover {
background: none repeat scroll 0 0 #3e4f4c;
}
nav ul li {
background: #3e4f4c;
border-bottom: 1px solid #191b1a;
border-top: 1px solid #697774;
display: block;
float: none;
height: 48px;
margin: 0 0 0 10px;
position: relative;
text-align: left;
width: 230px;
}
nav ul li a {
color: #eee;
display: block;
font-size: 13px;
padding: 16px 0 15px 15px;
position: relative;
text-decoration: none;
}
nav ul ul {
background: black repeat-y scroll 0 0 transparent;
border-radius: 0;
box-shadow: none;
display: none;
left: -10px;
list-style: outside none none;
padding: 0;
position: relative !important;
top: 0;
width: 240px;
}
nav ul li:first-child {
border-top: medium none;
}
nav ul ul li {
background: none repeat scroll 0 0 green;
border-bottom: 1px solid red;
display: block;
float: none;
height: 38px;
margin: 0 0 0 10px;
position: relative;
text-align: left;
width: 230px;
}
nav ul ul li a {
color: #fff;
display: block;
padding: 0;
position: relative;
text-decoration: none;
}
nav ul li:hover a.top {
background: #d8a900;
color: black;
}
nav ul li:hover > ul {
display: block;
}
<body>
<div id="header">
<div id="header-content-container"> Logo!
<div id="top-nav-container">
<nav>
<a id="menu_button"></a>
<ul class="top">
<li>
<a class="top" href="/">HOME</a>
</li>
<li>
<a class="top" href="#">SERVICES</a>
<ul>
<li>Item AAAAAAAAA
</li>
<li>Item AAAAAAAAAAAAAAA
</li>
<li>Item AAAAAAA
</li>
<li>Item AAAAAAAAA
</li>
<li>Item AAAAAAAAAAAAAAAA
</li>
<li>Item AAAAAAAAAAA
</li>
<li>Item AAAAAAAAAAAAAA
</li>
</ul>
</li>
<li>
<a class="top" herf="#">LIBRARY</a>
</li>
<li>
<a class="top" href="#">CONTACT</a>
<ul>
<li>Item BBBBBBBBBBBBB
</li>
<li>Item BBBBBBB
</li>
<li>Item BBBB
</li>
</ul>
</li>
<li></li><!-- extra li for styling later -->
</ul>
</nav>
</div>
</div>
</div>
<div class="clearer"></div>
</body>
just add nav ul li { height: auto; } http://jsfiddle.net/cbavfv3j/4/
but i prefer jQuery on click function for this situation :)
The problem is that the height of ht li is always fixed. You need to release it on hover so that inner list could expand properly. For this just add one more rule height: auto:
nav ul li:hover {
height: auto;
}
nav ul li:hover > ul {
display: block;
}
Demo: http://jsfiddle.net/cbavfv3j/5/
I was able to successfully create a navigation menu with a submenu that appears on hover. However, I would like my submenus to have columns. I used Vanga Sasidhar's tips on creating the hover nav, I now need to create the columns under the Solutions and Support menu items.
Here is my jsfiddle: http://jsfiddle.net/DKu7p/.
Here is my CSS:
.site-nav li {
display:block;
float:left;
list-style:none;
margin: 0;
position: relative;
width: 100px;
}
.site-nav li:hover {
background:#1f78c3;
cursor:pointer;
}
.site-nav li a {
color:#696969;
display:block;
text-align:center;
text-decoration:none;
padding:5px 10px;
}
.site-nav li a:hover {
color:#00598B;
display:block;
text-align:center;
text-decoration:none;
padding:5px 10px;
}
.site-nav .dropdown {
display : none;
position : relative;
}
.site-nav .dropdown li { float : none; }
.site-nav li:hover .dropdown { display : block; position: relative; }
.dropdown {
background: #fff;
border: 1px solid #fff;
border-top: 0;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.35);
list-style: none;
margin: 4px 0 0 -9px;
min-width: 150px;
overflow: hidden;
padding: 0;
position: relative;
z-index: 999;
}
.dropdown li {
border: 0;
border-radius: 0;
clear: both;
float: none;
font-size: .9em;
margin: 0;
width: 100%;
}
.dropdown li span {
display: none !important;
}
.dropdown li a {
background: none;
color: #333;
display: block;
font-size: 1.1em;
font-weight: normal;
padding: 5px 8px;
text-align: left;
text-shadow: none;
}
.dropdown li a:hover {
background: #ddd;
color: #0c84bb;
text-decoration: none;
}
.dropdown .last a {
border-bottom: none;
}
Ok, here my try:
Apply the three column css layout
.col-columned{
width: 450px;
}
.col-maincontainer{
width: 450px; /*Width of main container*/
margin: 0 auto; /*Center container on page*/
}
.col-maincontainer ul, .col-maincontainer ul{
margin: 0;
padding: 0;
list-style-type: none;
}
.col-contentwrapper{
float: left;
width: 100%;
}
.col-contentcolumn{
margin: 0 190px 0 180px; /*Margins for content column. Should be "0 RightColumnWidth 0 LeftColumnWidth*/
}
.col-leftcolumn{
float: left;
width: 150px; /*Width of left column in pixel*/
margin-left: -450px; /*Set margin to that of -(MainContainerWidth)*/
background: #C8FC98;
}
.col-rightcolumn{
float: left;
width: 150px; /*Width of right column*/
margin-left: -150px; /*Set left margin to -(RightColumnWidth)*/
background: #FDE95E;
}
.col-innertube{
margin: 3px; /*Margins for inner DIV inside each column (to provide padding)*/
margin-top: 0;
}
And then, add a new element with the html markout of three columns:
<a class="drop-link">Example1</a>
<ul class="dropdown col-columned">
<li>
<div class="col-maincontainer">
<div class="col-contentwrapper">
<div class="col-contentcolumn">
<div class="col-innertube">
<div class="wiki-tree">
<ul>
<li><a class="dropdown-title">topic1</a></li>
<li><a class="dropdown-title">topic2</a></li>
<li><a class="dropdown-title">topic3</a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="col-leftcolumn">
<div class="col-innertube">
<div class="wiki-tree">
<ul>
<li><a class="dropdown-title">topic1</a></li>
<li><a class="dropdown-title">topic2</a></li>
<li><a class="dropdown-title">topic3</a></li>
</ul>
</div>
</div>
</div>
<div class="col-rightcolumn">
<div class="col-innertube">
<div class="wiki-tree">
<ul>
<li><a class="dropdown-title">topic1</a></li>
<li><a class="dropdown-title">topic2</a></li>
<li><a class="dropdown-title">topic3</a></li>
</ul>
</div>
</div>
</div>
</div>
</li>
</ul>
Make sure to add the col-columned to the dropdown element like this:
<ul class="dropdown col-columned">
Here the live example: http://jsfiddle.net/8fgG5/1/