Log in

View Full Version : Horizontal submenu help



starfireheat
12-29-2011, 06:06 AM
Hi all,

Right now i have a horizontal drop down menu.But i want a Horizontal menu and submenu both.

So, I want to make the vertical drop down submenu into horizontal.Hope i am clear with my problem.I tried researching internet for solution,but had no luck.

Here are my style.css and ddsmoothmenu.css


ddsmoothmenu.css

#menu ul.ddsmoothmenu{
margin:0;
padding:0;
list-style:none;
float:left;
position:relative;
z-index:10000;
}

/*Top level list items*/
#menu ul.ddsmoothmenu li{
position: relative;
display: inline;
float: left;
}

/*Top level menu link items style*/
#menu ul.ddsmoothmenu li li {
width:auto;
font:11px Arial, Helvetica, sans-serif !important;
text-transform:capitalize;
margin:0;
padding:0;
}

#menu ul.ddsmoothmenu li li a{
width: 130px; /*width of sub menus*/
height:auto;
float:none;
display: block;
text-align:left;
color: #fff;
text-shadow:none;
margin:0;
padding:6px 18px;
text-decoration: none;
background:none;
position:relative;
border-bottom:1px solid #EEEEEE;
}

* html #menu ul.ddsmoothmenu li li a{ /*IE6 hack to get sub menu links to behave correctly*/
display: inline-block;
}

#menu ul.ddsmoothmenu li li a:link, #menu ul.ddsmoothmenu li li a:visited{
color: #888888;
background:url(../images/submenu_px.gif) top repeat-x #fff;
}

#menu ul.ddsmoothmenu li li a.selected,
#menu ul.ddsmoothmenu li li a:hover { /*CSS class that's dynamically added to the currently active menu items' LI A element*/
color: #fff;
background:#4E4E4F;
}

/*1st sub level menu*/
#menu ul.ddsmoothmenu li ul{
border-top:1px solid #EEEEEE;
margin:0;
padding:0;
position: absolute;
left: 0;
display: none; /*collapse all sub menus to begin with*/
visibility: hidden;
background:#E3E3E3; /*background of menu items (default state)*/
}

/*Sub level menu list items (undo style from Top level List Items)*/
#menu ul.ddsmoothmenu li ul li{
display: list-item;
float: none;
}

/*All subsequent sub menu levels vertical offset after 1st level sub menu */
#menu ul.ddsmoothmenu li ul li ul{
padding-top:0;
background:#E3E3E3;
border-top:1px solid #EEEEEE;
*margin-top:0;
margin-top:-1px;
}

/* Holly Hack for IE \*/
* html .ddsmoothmenu{height: 1%;} /*Holly Hack for IE7 and below*/


/* ######### CSS classes applied to down and right arrow images ######### */

.downarrowclass{
display:block;
position: absolute;
width:0; height:0;
overflow:hidden;
top: 0; right: 0;
display:none !important;
}

.rightarrowclass{
display:block;
width:5px;
height:7px;
position: absolute;
margin-top:-3px;
top: 50%;
right: 8px;
background:url(../images/right.gif) 0 0 no-repeat;
}

/* ######### CSS for shadow added to sub menus ######### */

.ddshadow{
width:0;
height:0;
position: absolute;
left: 0;
top: 0;
display:none;
}

and here is style.css Nav menu option


/* ---- Main Nav Area ---- */

.mainnav_full {
width:100%;
padding-top:5px;
background:url(../../images/main_nav_bg.gif) bottom repeat-x #F8F8F8;
border-bottom:1px solid #fff;
}

#MainNav {
width:960px;
min-height:80px;
_height:80px;
position:relative;
z-index:1000;
margin:0 auto;
}

/* -- logo -- */

a.logo {
width:auto;
height:auto;
margin:18px 60px 10px 0;
display:block;
outline:none;
float:left;
font:bold 2em/1em "Arial Narrow", Arial, Helvetica, sans-serif;
color:#2b2b2b;
text-decoration:none;
}

a:hover.logo {
color:#5b5b5b;
text-decoration:none;
}

/* -- menu -- */

#menu {
float:right;
position:relative;
z-index:1001;
padding-top:10px;
}

#menu li {
width:auto;
margin:0 1px 0 0;
padding:0;
float:left;
font:bold 1.2em/1.1em Arial, Helvetica, sans-serif;
background:none;
position:relative;
}

#menu li a {
width:auto;
height:37px;
margin:0;
padding:15px 18px 10px;
position:relative;
float:left;
color:#232323;
/*text-align:center;*/
text-decoration:none;
z-index:1000;
}

#MainNav li .menuslide {
position:absolute;
z-index:999;
width:100%;
height:62px;
background:url(../../images/menu_slide.gif) top repeat-x #404041;
display:none;
margin-top:-40px;
top:40px;
left:0;
}

#MainNav li li .menuslide {
position:absolute;
width:0;
height:0;
background:none;
display:none;
margin-top:0;
top:0;
left:0;
}

#menu li a.selected,
#menu li a:hover{
color:#fff;
}

#menu li.current-menu-item a,
#menu li.current-menu-parent a,
#menu li.current_page_parent a {
color:#fff;
background:url(../../images/menu_slide.gif) top repeat-x #404041;
}

#menu li.current-menu-item a:hover,
#menu li.current-menu-parent a:hover,
#menu li.current_page_parent a:hover,
#menu li a:hover.selected{
text-decoration:none;
}

.menu_description {
display:block;
font:10px Arial, Helvetica, sans-serif;
color:#BEBEBE;
}

Thanks :)