When you click on links in my drop-down menu, the URL just keeps adding the next url/page to the previous one. Below is my code and a screenshot of the issue. What am I doing wrong?
#menubar {
background: #00ffffff;
width: 840px;
color: #FFF;
margin: 0px;
padding: 0;
position: relative;
border-top: 0px solid #B2FFFF;
height: 35px;
}
#menus {
margin: 0;
padding: 0;
}
#menus ul {
float: left;
list-style: none;
margin: 0;
padding: 0;
}
#menus li {
list-style: none;
margin-bottom: 10px;
padding-bottom: 0px;
border-left: 1px solid #D3D3D3;
border-right: 1px solid #D3D3D3;
height: 35px;
}
#menus li a,
#menus li a:link,
#menus li a:visited {
color: #000;
display: block;
font: normal 20px Bradley Hand ITC, Book Antiqua, Century Gothic, Harlow Solid Italic, Arial Unicode MS;
margin: 0;
padding: 9px 12px 10px 12px;
text-decoration: none;
}
#menus li a:hover,
#menus li a:active {
background: #130000;
/* Menu hover */
color: #FFF;
display: block;
text-decoration: none;
margin: 0;
padding: 9px 12px 10px 12px;
}
#menus li {
float: left;
padding: 0;
}
#menus li ul {
z-index: 9999;
position: absolute;
left: -999em;
height: auto;
width: 160px;
margin: 0;
padding: 0;
}
#menus li ul a {
width: 140px;
}
#menus li ul ul {
margin: -25px 0 0 160px;
}
#menus li:hover ul ul,
#menus li:hover ul ul ul,
#menus li.sfhover ul ul,
#menus li.sfhover ul ul ul {
left: -999em;
}
#menus li:hover ul,
#menus li li:hover ul,
#menus li li li:hover ul,
#menus li.sfhover ul,
#menus li li.sfhover ul,
#menus li li li.sfhover ul {
left: auto;
}
#menus li:hover,
#menus li.sfhover {
position: static;
}
#menus li li a,
#menus li li a:link,
#menus li li a:visited {
background: #00FFFF;
/* drop down background color */
width: 120px;
color: #FFF;
display: block;
font: normal 20px Bradley Hand ITC, Book Antiqua, Century Gothic, Harlow Solid Italic, Arial Unicode MS;
margin: 0;
padding: 9px 12px 10px 12px;
text-decoration: none;
z-index: 9999;
border-bottom: 1px solid #1A6680;
}
#menus li li a:hover,
#menus li li a:active {
background: #130000;
/* Drop down hover */
color: #FFF;
display: block;
margin: 0;
padding: 9px 12px 10px 12px;
text-decoration: none;
}
<div id='menubar'>
<ul id='menus'>
<li>
<a href='gilbertlzrus.blogspot.com'>Home</a>
</li>
<li>
<a href='search/label/Posts'>Posts</a>
<ul>
<li><a href='search/label/FKUI'>FK UI</a></li>
<li><a href='search/label/Articles'>Articles</a></li>
<li><a href='search/label/Download'>Download</a></li>
</ul>
</li>
<li>
<a href='#'>About Me</a>
</li>
</ul>
</div>
Notice the URL here:
Your links are with a relative path, meaning that the part in href="..." will be added to the current address in the browser.
Change the href="..." to this:
<div id='menubar'>
<ul id='menus'>
<li>
Home
</li>
<li>
Posts
<ul>
<li>FK UI</li>
<li>Articles</li>
<li>Download</li>
</ul>
</li>
<li>
<a href='#'>About Me</a>
</li>
</ul>
</div>
a / at the beginning means that the link will start at the domain.
// Examples:
// href="/" => http(s)://CURRENT_DOMAIN/
// href="/search/label/FKUI" => http(s)://CURRENT_DOMAIN/search/label/FKUI
// href="search/label/FKUI" => http(s)://CURRENT_DOMAIN/CURRENT_PATH/search/label/FKUI
Add this Code to you website
#import url(http://fonts.googleapis.com/css?family=Montserrat);
#import url(https://fonts.googleapis.com/icon?family=Material+Icons);
* {
margin: 0;
padding: 0;
}
.nav {
background: #232323;
height: 60px;
display: inline-block;
}
.nav li {
float: left;
list-style-type: none;
position: relative;
}
.nav li a {
font-size: 16px;
color: white;
display: block;
line-height: 60px;
padding: 0 26px;
text-decoration: none;
border-left: 1px solid #2e2e2e;
font-family: Montserrat, sans-serif;
text-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
}
.nav li a:hover {
background-color: #2e2e2e;
}
#settings a {
padding: 18px;
height: 24px;
font-size: 10px;
line-height: 24px;
}
::-webkit-input-placeholder { /* WebKit browsers */
color: white;
}
:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
color: white;
}
::-moz-placeholder { /* Mozilla Firefox 19+ */
color: white;
}
:-ms-input-placeholder { /* Internet Explorer 10+ */
color: white;
}
#options a{
border-left: 0 none;
}
#options>a {
background-image: url(triangle.png);
background-position: 85% center;
background-repeat: no-repeat;
padding-right: 42px;
}
.subnav {
visibility: hidden;
position: absolute;
top: 110%;
right: 0;
width: 200px;
height: auto;
opacity: 0;
transition: all 0.1s;
background: #232323;
}
.subnav li {
float: none;
}
.subnav li a {
border-bottom: 1px solid #2e2e2e;
}
#options:hover .subnav {
visibility: visible;
top: 100%;
opacity: 1;
}
<ul class="nav">
<li id="settings">
<i class="material-icons" style="font-size:25px;line-height: 25px;">home</i>
</li>
<li>
<a href='search/label/Posts'>Posts</a>
</li>
<li id="options">
<a href='search/label/Posts'>Posts</a>
<ul class="subnav">
<li><a href='search/label/FKUI'>FK UI</a></li>
<li><a href='search/label/Articles'>Articles</a></li>
<li><a href='search/label/Download'>Download</a></li>
</ul>
</li>
<li>
<a href='#'>About Me</a>
</li>
</ul>
Related
I need to display sub-sub-menu on hover of my sub-menu. So far I did code to display menu -> sub-menu on menu click, but to proceed I want a functionality to display sub-sub-menu on hover of my sub-menu. Can somebody help me to achieve the same?
var ddmenuitem = 0;
function jsddm_open() {
jsddm_close();
ddmenuitem = $(this).find('ul.submenu').css('display', 'block');
// $(this).find('div.subsubmenu').css('display','none');
}
function jsddm_close() {
if (ddmenuitem) ddmenuitem.css('display', 'none');
}
$(document).ready(function() {
$('#topnav > ul > li').bind('click', jsddm_open)
$('#topnav > ul > li > a').click(function(ev) {
if ($(this).hasClass('current')) {
ev.preventDefault();
}
if ($(this).attr('class') != 'active') {
$('#topnav ul li a').removeClass('active');
$(this).addClass('active');
}
});
});
#topnav {
float: left;
width: 600px;
height: 30px;
background: black;
margin-top: 10px;
position: relative;
font-size: 15px;
margin-left: 30px
}
#topnav ul {
list-style: none;
padding: 0px;
margin: 0px;
}
#topnav ul li {
float: left;
margin: 0;
padding: 0;
}
#topnav ul li a {
padding: 5px 15px;
color: red;
text-decoration: none;
display: block;
font-weight: bold;
}
#topnav ul li a:link {
color: red;
text-decoration: none;
}
#topnav ul li a:visited {
color: #FFF;
text-decoration: none;
}
#topnav ul li a:hover {
color: red;
text-decoration: none;
}
#topnav ul li a.active {
text-decoration: none;
color: black;
background: #e0e0e0;
}
#topnav ul li ul.submenu {
float: left;
padding: 4px 0;
position: absolute;
left: 0;
top: 30px;
display: none;
background: #e0e0e0;
color: #00537F;
width: 600px;
height: 30px;
}
#topnav ul li ul.submenu a {
display: inline;
color: #00537F;
padding: 4px 8px;
}
#topnav ul.submenu a:hover {
background-color: black;
color: white;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="topnav">
<ul>sds
<li>
Admin
</li>
<li>
MAC
<ul class="submenu">
<li>Master Data</li>
<li>
Transaction Data
<ul>
<li>Company Master</li>
<li>Location Master</li>
<li>Size Master</li>
</ul>
</li>
<li>
Admin Data
</li>
</ul>
</li>
</ul>
</div>
Try the following snippet without using jquery or javascript, you can get it done using only css. And have updated according to your question
#nav {
list-style: none inside;
margin: 0;
padding: 0;
text-align: center;
}
#nav li {
display: block;
position: relative;
float: left;
background: #000000;
}
#nav li a {
display: block;
padding: 0;
text-decoration: none;
width: 200px;
line-height: 35px;
color: #fff;
}
#nav li li a {
font-size: 80%;
}
#nav li:hover {
background: #ff0000;
}
#nav ul {
position: absolute;
padding: 0;
left: 0;
display: none;
}
#nav li:hover ul ul {
display: none;
}
#nav li:hover ul {
display: block;
}
#nav li li:hover ul {
display: block;
margin-left: 200px;
margin-top: -35px;
}
<div id="topnav">
<ul id="nav">
<li>
Admin
</li>
<li>
MAC
<ul class="submenu">
<li>Master Data</li>
<li>
Transaction Data ⇒
<ul>
<li>Company Master</li>
<li>Location Master</li>
<li>Size Master</li>
</ul>
</li>
<li>
Admin Data
</li>
</ul>
</li>
</ul>
</div>
you can try this
#menu {
background: #343434;
color: #eee;
height: 35px;
border-bottom: 4px solid #eeeded
}
#menu ul,
#menu li {
margin: 0 0;
padding: 0 0;
list-style: none
}
#menu ul {
height: 35px
}
#menu li {
float: left;
display: inline;
position: relative;
font: bold 12px Arial;
text-shadow: 0 -1px 0 #000;
border-right: 1px solid #444;
border-left: 1px solid #111;
text-transform: uppercase
}
#menu li:first-child {
border-left: none
}
#menu a {
display: block;
line-height: 35px;
padding: 0 14px;
text-decoration: none;
color: #eee;
}
#menu li:hover > a,
#menu li a:hover {
background: #111
}
#menu input {
display: none;
margin: 0 0;
padding: 0 0;
width: 80px;
height: 35px;
opacity: 0;
cursor: pointer
}
#menu label {
font: bold 30px Arial;
display: none;
width: 35px;
height: 36px;
line-height: 36px;
text-align: center
}
#menu label span {
font-size: 12px;
position: absolute;
left: 35px
}
#menu ul.menus {
height: auto;
width: 180px;
background: #111;
position: absolute;
z-index: 99;
display: none;
border: 0;
}
#menu ul.menus li {
display: block;
width: 100%;
font: 12px Arial;
text-transform: none;
}
#menu li:hover ul.menus {
display: block
}
#menu a.home {
background: #c00;
}
#menu a.prett {
padding: 0 27px 0 14px
}
#menu a.prett::after {
content: "";
width: 0;
height: 0;
border-width: 6px 5px;
border-style: solid;
border-color: #eee transparent transparent transparent;
position: absolute;
top: 15px;
right: 9px
}
#menu ul.menus a:hover {
background: #333;
}
#menu ul.menus .submenu {
display: none;
position: absolute;
left: 180px;
background: #111;
top: 0;
width: 180px;
}
#menu ul.menus .submenu li {
background: #111;
}
#menu ul.menus .has-submenu:hover .submenu {
display: block;
}
<nav>
<ul id='menu'>
<li><a class='home' href='/'>Home</a></li>
<li><a class='prett' href='#' title='Menu'>Menu</a>
<ul class='menus'>
<li class='has-submenu'><a class='prett' href='Dropdown 1' title='Dropdown 1'>Dropdown 1 + Sub Menu</a>
<ul class='submenu'>
<li>Sub Menu</li>
<li>Sub Menu 2</li>
<li>Sub Menu 3</li>
</ul>
</li>
<li><a href='#' title='Dropdown 2'>Dropdown 2</a></li>
<li><a href='#' title='Dropdown 3'>Dropdown 3</a></li>
</ul>
</li>
</ul>
</nav>
I am trying to make horizontal menu navigation. I have several links in navigation, and I would like to have equal horizontal space between them.
How to make links in horizontal menu with equal space between them?
HTML:
<div id="header">
<div class="secondary-navigation">
<div itemscope itemtype="http://schema.org/SiteNavigationElement">
<nav id="navigation">
<ul id="menu-main" class="menu">
<li class="menu-item">Link</li>
<li class="menu-item">Link</li>
<li class="menu-item">Link</li>
<li class="menu-item">Link</li>
<li class="menu-item">Link</li>
<li class="menu-item">Link</li>
<li class="menu-item">Link</li>
<li class="menu-item">Link</li>
</ul>
Menu
</nav>
</div>
</div>
</div>
CSS:
#header {
position: relative;
float: left;
padding: 0 0 0 0;
clear: both;
}
/*-----------------------------------------------
/* Header navigation
/*---------------------------------------------*/
.secondary-navigation {
display: block;
width: 100%;
float: left;
}
.secondary-navigation a {
vertical-align: top;
color: #F1F1F1;
font-weight: bold;
margin-top: 8px;
margin-bottom: 4px;
line-height:18px;
font-size: 15px;
border-bottom: 2px solid #333888;
}
.secondary-navigation a:hover, .secondary-navigation .sfHover {
color: #F1F1F1;
border-bottom: 2px solid #F1F1F1;
}
.secondary-navigation li li a { line-height: 1 }
.secondary-navigation a .sub {
font-size: 12px;
font-weight: normal;
color: #CFCFCF;
text-transform: none;
}
.menu-item-has-children > a:after {
content: "▼";
font-size: 10px;
color: #F1F1F1;
position: absolute;
right: 12px;
top: 22px;
}
.footer-navigation .menu-item-has-children > a:after { display: none }
.sub-menu .menu-item-has-children>a:after {
right: 0;
top: 17px;
}
.menu .current-menu-item > a { background: #fff }
.menu .current-menu-item > a:after {
content: "";
position: absolute;
width: 100%;
height: 1px;
background: #fff;
bottom: 0px;
left: 0;
z-index: 1;
}
#navigation {
margin: 0 auto;
font-size: 13px;
width: 100%;
float: left;
}
#navigation ul {
margin: 0 auto;
list-style: none; /*Added*/}
#navigation .menu { float: left; }
#navigation ul li {
float: left;
position: relative;
margin-left: 0;
}
#navigation > ul li:first-child a { }
#navigation > ul li:last-child a { border-right: 0 }
#navigation ul .header-search { float: right }
#navigation > ul > li:last-child { border-right: none }
#navigation ul li a, #navigation ul li a:link, #navigation ul li a:visited { display: block }
#navigation > ul > .current a {
background: transparent;
color: #555 !important;
}
#navigation li:hover ul, #navigation li li:hover ul, #navigation li li li:hover ul, #navigation li li li li:hover ul {
opacity: 1;
left: -228px;
top: 0;
}
#navigation ul ul {
position: absolute;
width: 226px;
z-index: 400;
font-size: 12px;
color: #333888;
border: 1px solid #F1F1F1;
background: #FFFFFF;
padding: 0;
}
#navigation ul ul li {
margin-left: 0;
padding: 0 10%;
width: 80%;
color: #333;
}
#navigation ul ul li:hover { background: #F1F1F1 }
#navigation ul ul a, #navigation ul ul a:link, #navigation ul ul a:visited {
padding: 12px 0;
position: relative;
border-left: 0;
background: transparent;
border-right: 0;
text-transform: none;
line-height: 1.4;
margin-right: 0;
min-height: 100%;
}
#navigation ul ul li:last-child a { border-bottom: none }
#navigation ul ul {
opacity: 0;
left: -999em;
}
#navigation ul li:hover ul {
left: -1px;
opacity: 1;
top: 81px;
}
#navigation ul ul li:hover ul {
top: -1px;
left: -228px;
padding-top: 0;
}
#navigation ul ul ul:after { border-color: transparent }
I tried something like this, but it does not work for me.
You can use justify-content: space-between or justify-content: space-around flexbox property
ul {
display: flex;
justify-content: space-between;
border: 1px solid black;
list-style-type: none;
padding: 10px;
margin: 0;
}
<ul>
<li>Random Link</li>
<li>Random Link</li>
<li>Random Link</li>
<li>Random Link</li>
</ul>
I have ran into a slight problem with my dropdown menu. I need and extra level in my dropdown, but i really don't know what to do with the CSS...
The page can be seen here.
The problem can be seen in the menu under "Om os", where "Brochure 2013", "Brochure 2014" should be visible when hovering over "Brochure" and not as it is now!
How to fix this?
Here's my CSS:
.cssmenu {
border: 0px solid #2E181A;
margin: 0px auto 0px auto;
padding: 0px;
font-family: verdana,geneva,arial,helvetica,sans-serif;
font-size: 14px;
font-weight: bold;
color: #2E181A;
width: 798px;
background: #E6D9BD;
text-align: center;
}
.cssmenu ul {
background: #E6D9BD;
height: 37px;
list-style: none;
margin: 0px auto 0px auto;
padding: 0;
text-align: center;
}
.cssmenu li {
padding: 0px 8px 0px 8px;
display: inline-block;
}
.cssmenu li a {
color: #2E181A;
display: block;
font-weight: bold;
line-height: 37px;
padding: 0px 10px;
text-align: center;
text-decoration: none;
}
.cssmenu li a:hover {
color: #8e8e8e;
text-decoration: none;
}
.cssmenu li ul {
background: #E6D9BD;
border-left: 5px solid #2E181A;
border-right: 5px solid #2E181A;
border-bottom: 5px solid #2E181A;
display: none;
height: auto;
opacity: 0.95;
filter: alpha(opacity=95);
/* For IE8 and earlier */
position: absolute;
width: 225px;
z-index: 200;
float: none;
/*top:1em;
/*left:0;*/;
}
.cssmenu li:hover ul {
display: block;
}
.cssmenu li li {
display: block;
float: none;
padding: 0px;
width: 225px;
}
.cssmenu li ul a {
display: block;
font-size: 12px;
font-style: normal;
padding: 0px 25px 0px 25px;
text-align: left;
}
.cssmenu li ul a:hover {
background: #D5BE91;
color: #000000;
opacity: 1;
filter: alpha(opacity=100);
/* For IE8 and earlier */;
}
.cssmenu p {
clear: left;
}
.cssmenu .active > a {
background:;
color: #ffffff;
}
.cssmenu .active > a:hover {
color: #ffffff;
}
And here's my menu:
<ul class="active">
<li><span>Forside</span>
</li>
<li><span>Hingste</span>
<ul>
<li><span>Volstrups Cash</span>
</li>
<li><span>Churchill</span>
</li>
<li><span>Blejsbjergs Cooper</span>
</li>
<li><span>Con Cosmos</span>
</li>
</ul>
</li>
<li><span>Salgsheste</span>
<ul>
<li><span>Volstrups Charline</span>
</li>
<li><span>Volstrups Calina</span>
</li>
<li><span>Volstrups Colline</span>
</li>
</ul>
</li>
<li><span>Betingelser</span>
</li>
<li><span>Om os</span>
<ul>
<li><span>Heste på stationen</span>
</li>
<li><span>Samarbejdspartnere</span>
</li>
<li><span>Om Stutteriet</span>
</li>
<li><span>Brochure</span>
<ul>
<li><span>Brochure for 2014</span>
</li>
<li><span>Brochure for 2013</span>
</li>
</ul>
</li>
</ul>
</li>
Hope you guys can help me out! :)
you need woking with level3 ul.add some margin-top andleft to 100%
just add this porperty to you css file:
.cssmenu li li:hover > ul{
visibility:visible !important
}
.cssmenu li ul ul {
margin-top: -30px;
left: 100%;
width: 100%;
visibility:hidden;
border-left:none;
margin-left:-5px;
}
.cssmenu li ul ul a{
border-left:5px solid #2E181A;
}
.cssmenu li ul ul li:first-child a{
border-left:none !important;
}
also you don't need add the <a> tag into <span>. you can remove that,
Below is my code, currently when I hover on "About Us" everything below the dropdown menu opens; how can i change the css so that it only hovers when i mouseover, this means, when i hover on "Team", then I should see the menus below it.
also how can i adjust the width so that it is shiffted more to the left.
also when the dropdown menu is longer in lenth, it hides below my content, i want the dropdown menu to be over the body of the page, not in hiding.
thanks in advance you all.
<style>
ul {
font-family: Arial, Verdana;
font-size: 14px;
margin: 0;
padding: 0;
list-style: none;
}
ul li {
display: block;
position: relative;
float: left;
}
li ul { display: none; }
ul li a {
display: block;
text-decoration: none;
color: #ffffff;
border-top: 1px solid #ffffff;
padding: 5px 15px 5px 15px;
background: #000061;
margin-left: 1px;
white-space: nowrap;
}
ul li a:hover { background: #617F8A; }
li:hover ul {
display: block;
position: absolute;
}
ul li:hover li {
float: none;
font-size: 11px;
}
li:hover a { background: #617F8A; }
li:hover li a:hover { background: #95A9B1; }
</style>
<body>
<ul id="menu">
<li><b>Home</b></li>
<li><b>About Us</b>
<ul>
<li>Team
<ul>
<li>Profile</li>
<li>Board</li>
</ul>
</li>
</ul>
</li>
<ul>
</body>
JSFiddle: http://jsfiddle.net/LWEry/
Like this:
ul {
font-family: Arial, Verdana;
font-size: 14px;
margin: 0;
padding: 0;
list-style: none;
}
ul li {
display: block;
position: relative;
float: left;
}
li ul { display: none; }
ul li a {
display: block;
text-decoration: none;
color: #ffffff;
border-top: 1px solid #ffffff;
padding: 5px 15px 5px 15px;
background: #000061;
margin-left: 1px;
white-space: nowrap;
}
ul li a:hover { background: #617F8A; }
li:hover > ul {
display: block;
position: absolute;
width: 100%;
}
ul li:hover li {
float: none;
font-size: 11px;
}
li:hover a { background: #617F8A; }
li:hover li a:hover { background: #95A9B1; }
.sub-menu
{
position: absolute;
top: 0;
left: 100%;
}
http://jsfiddle.net/3xWcu/2/
I changed one selector.
FROM
li:hover ul
TO
li:hover > ul
Edited my fiddle above. Added a sub-menu class to the ul containing the Profile and Board li tags:
<ul class="sub-menu">
<li>Profile</li>
<li>Board</li>
</ul>
and added some CSS above.
You mean like this? http://jsfiddle.net/3xWcu/
<style>
ul {
font-family: Arial, Verdana;
font-size: 14px;
margin: 0;
padding: 0;
list-style: none;
}
ul li {
display: block;
position: relative;
float: left;
}
li ul { display: none; }
ul li a {
display: block;
text-decoration: none;
color: #ffffff;
border-top: 1px solid #ffffff;
padding: 5px 15px 5px 15px;
background: #000061;
margin-left: 1px;
white-space: nowrap;
}
ul li a:hover { background: #617F8A; }
li:hover ul {
display: block;
position: absolute;
width: 100%;
}
ul li:hover li {
float: none;
font-size: 11px;
}
li:hover a { background: #617F8A; }
li:hover li a:hover { background: #95A9B1; }
</style>
<body>
<ul id="menu">
<li><b>Home</b></li>
<li><b>About Us</b>
<ul>
<li>Team
<ul>
<li>Profile</li>
<li>Board</li>
</ul>
</li>
</ul>
</li>
<ul>
</body>
My Current Menu navigation bar in html: -
You can see my blog Live by click this Link :- www.4time2fun.com
<div id="topmenu">
<div id="navigation">
<ul class="categories">
<li class="articles"> <img src="http://4.bp.blogspot.com/-9vOA-2QWrsA/UF7oc4Cgn5I/AAAAAAAAE1k/hVusG2XkwKU/s1600/home.png"></li>
<li class="tags mega">Category 4 Fun
<ul class="two">
<li class="tag-item"><a title="#Title" href="#Link">Accessories</a></li>
<li class="tag-item"><a title="#Title" href="#Link">Automotive</a></li>
<li class="tag-item"><a title="#Title" href="#Link">Beauty</a></li>
<li class="tag-item"><a title="#Title" href="#Link">Clothing/Apparel</a></li>
</ul> </li>
<li class="about">Team 2 Hire
</li> <li class="about">Who We Are</li>
<li class="articles">2 Contact Us</li>
</ul> </div></div>
My Current Menu navigation bar in Css: -
#topmenu {
background: none repeat scroll 0 0 #FBFBFB;
display: block;
height: 70px;
padding-top: 15px;
text-transform: uppercase;
width: 990px;
}
#navigation {
padding: 0 0 5px;
}
#navigation ul li {
display: inline;
margin-left: 0;
}
#navigation ul li a {
padding: 8px 15px;
}
#header #navigation li.mega ul li a {
font-family: 'Cuprum',arial,serif;
font-weight: normal;
text-transform: lowercase;
}
li.mega ul {
background-color: rgba(255, 255, 255, 0.97);
border-top: 2px solid #22C3EB;
padding: 10px 0;
position: absolute;
top: 50px;
z-index: 2;
}
li.mega ul li {
display: block;
float: left;
width: 145px;
}
li.mega ul li a {
line-height: 30px;
}
#navigation ul li.tags a {
background: url("http://3.bp.blogspot.com/-ftBEvkZbSMo/TwKvUPTt-II/AAAAAAAAECE/Wrh6HobGwak/s000/arrow_rewards.gif") no-repeat scroll 160px 14px transparent;
padding-right: 25px;
}
#navigation ul li.tags a:hover {
background: url("http://3.bp.blogspot.com/-ftBEvkZbSMo/TwKvUPTt-II/AAAAAAAAECE/Wrh6HobGwak/s000/arrow_rewards.gif") no-repeat scroll 160px -10px transparent;
}
#navigation ul li.tags li a, #navigation ul li.tags li a:hover {
background: none repeat scroll 0 0 transparent;
}
#navigation ul li.tags li a {
display: block;
padding: 0 15px;
}
#navigation ul li.tags li a:active {
border: medium none;
}
#navigation ul li.tags li {
float: left;
width: 160px;
}
li.mega ul.two.second {
display: none !important;
}
li.mega ul {
left: -9999px;
position: absolute;
}
li.mega:hover ul, li.mega li ul:hover {
left: auto;
}
body.category-articles #navigation ul li.articles a, body.category-bestoftheweek #navigation ul li.bestoftheweek a, body.category-about #navigation ul li.about a, body.page-template-page-about-php #navigation ul li.about a, body.page-template-page-contact-php #navigation ul li.contact a {
background-color: #22C3EB;
color: #FFFFFF;
}
#topmenu #navigation a {
color: #616060;
font-family: 'Cuprum',arial,serif;
font-size: 18px;
font-weight: normal;
text-transform: uppercase;
}
#topmenu #navigation a:hover {
border-radius: 50px 50px 50px 50px;
color: #BBBBBB;
}
Right now my Sub-menu open in horizontal line and Now I want to create my Sub-menu (Category 4 Fun) in vertical By using ul class "two" and li class "tag-item".
add this style to your css code
.two{
width:100px;
margin-left:50px;
}
DEMO