I've got a tabbed menu that looks something like this:
The html for it is simple:
<div id="menuContainer">
<ul id="menu" class="undecorated ">
<li id="menuHome"><%= Html.ActionLink<HomeController>(c=>c.Index(), "Home") %> </li>
<li id="menuAbout"><%= Html.ActionLink<UsergroupController>(c=>c.About(), "About") %> </li>
<li id="menuArchives"><%= Html.ActionLink<UsergroupController>(c=>c.Archives(), "Archives") %> </li>
<li id="menuLinks"><%= Html.ActionLink<UsergroupController>(c=>c.Links(), "Links") %> </li>
</ul>
<div id="menuBar" class="container"> </div>
</div>
And the JQuery:
$(function() {
$('.container').corner();
$('ul#menu li').corner('30px top');
});
and on each page something like:
$(function() {
$('#menuHome').addClass('current')
})
I would like to indicate the "current" tab with a drop shadow behind it. I am thinking I would do this by
- Create a shadow 'li' with $('.current').after('  ')
- Use CSS to set the shadow color and round the top right corner with jquery
- Shift it over with CSS position: relative; top: 5px; left: -5px;
The problem that I am having is that the shadow appears on top of the element to the left. Setting its z-index low makes it disappear altogether for some reason. How do I make it appear behind the previous list-item?
Alternatively, what's a better way to do this?