Skip to content

Instantly share code, notes, and snippets.

@sanjaybhowmick
Created September 9, 2015 09:31
Show Gist options
  • Save sanjaybhowmick/b099732c277b4044dae0 to your computer and use it in GitHub Desktop.
Save sanjaybhowmick/b099732c277b4044dae0 to your computer and use it in GitHub Desktop.
Wordpress CSS based drop-down menu now works on IE6
/*jquerycssmenu_start*/
#nav_container{
background:url(images/nav_bg.jpg) repeat-x;
width:1000px;
}
.jquerycssmenu{
width:auto;
}
.jquerycssmenu ul{
margin: 0;
padding: 0;
list-style-type: none;
}
/*Top level list items*/
.jquerycssmenu ul li{
width:auto;
font:normal 1.2em Calibri;
color:#FFFFFF;
float:left;
border-right:#9ebade 1px dotted;
text-decoration:none;
position: relative;
list-style: none;
display: inline;
z-index:500;
}
/*Top level menu link items style*/
.jquerycssmenu ul li a{
background:url(images/nav_bg.jpg) repeat-x;
width:auto;
padding:0 45px;
line-height:45px;
color:#FFFFFF;
text-decoration: none;
display: block;
}
.jquerycssmenu .current a,jquerycssmenu ul li:hover> a{
background: #0399d4;
color: #fff;
text-decoration:none;
}
/*1st sub level menu*/
.jquerycssmenu ul li ul{
position: absolute;
left: 0;
display: block;
visibility: hidden;
}
/*Sub level menu list items (undo style from Top level List Items)*/
.jquerycssmenu ul li ul li{
display: list-item;
float: none;
}
/*All subsequent sub menu levels vertical offset after 1st level sub menu */
.jquerycssmenu ul li ul li ul{
top: 0;
}
/* Sub level menu links style */
.jquerycssmenu ul li ul li a{
background:#f0f0f0;
font: normal 12px Arial, Helvetica, sans-serif;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.9);
line-height:25px;
color: #666;
width: 144px; /*width of sub menus*/
padding: 4px 5px 0 15px;
margin: 0;
border-top: 1px solid #e1e1e1;
}
.jquerycssmenu ul li ul li a:hover{ /*sub menus hover style*/
background: #0399d4 !important; /* for non-css3 browsers */
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#04acec', endColorstr='#0186ba'); /* for IE */
background: -webkit-gradient(linear, left top, left bottom, from(#04acec), to(#0186ba)) !important; /* for webkit browsers */
background: -moz-linear-gradient(top, #04acec, #0186ba) !important; /* for firefox 3.6+ */
color: #fff;
text-shadow: 0 1px 1px rgba(6, 104, 165, 0.9);
}
/* ######### CSS classes applied to down and right arrow images ######### */
.downarrowclass{
position: absolute;
top: 7px;
right: 5px;
}
.rightarrowclass{
position: absolute;
top: 5px;
right: 5px;
}
/*jquerycssmenu_end*/
<div id="nav_container">
<div id="myjquerymenu">
<ul>
<ul>
<?php wp_nav_menu( array( 'theme_location' => 'primary-menu', 'container' => flase ) ); ?>
</ul>
<div></div>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment