Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6830671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:38:43+00:00 2026-05-26T22:38:43+00:00

I have a simple accordion menu working using jQuery but I’m having trouble styling

  • 0

I have a simple accordion menu working using jQuery but I’m having trouble styling it so each element casts a shadow on each subsequent one. The menu is comprised of an unordered list where each element is a link that triggers a slideDown/Up on click revealing/hiding a section. All I want is each heading, the orange boxes, to cast a shadow on the one after it but it seems no amount of z-indexing can overcome the defaults set by the list (if I remove the list backgrounds or make the shadows go up instead of down I can see them).

Here you can see I’ve tried everything I can think of to make things order correctly. I’ve z-indexed both the list elements and the anchors in descending order but still no luck. Anyone know how to get box shadows to work correctly here? You can see the last items shadow looks find, I want beneath each item.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:38:44+00:00Added an answer on May 26, 2026 at 10:38 pm

    Actually you are so close…

    Causes:

    1. stack order covered the shadow
    2. z-index only work with element with position other than static

    So, the solution will be:
    For the element using z-index, add position:relative. So add one more rule should help:

    ul#menu li, 
    ul#menu li a {
        position:relative
    }
    

    It should be okay for most browser except IE, which have some little trouble in order to support negative z-index and position: relative – but since they don’t have nice box-shadow, you may ignore them.

    Alternative: If you hate to use z-index for every li, you may prefer inset box-shadow,

    ul#menu li a { 
        box-shadow:inset 0px 6px 13px #777;
    }
    

    Shadow is weaker and the browser support is much more narrow (latest modern browser) but it is easier for coding.

    p.s. for this question, add a CSS tag will help a lot.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple accordion menu I've put together today using the jQuery slideDown()
I am new to Jquery but have written a simple vertical accordion. It seems
I have made a simple accordion for my site using jQuery... It worked great,
I have a simple menu on a web page, based on the jQuery Accordion.
I am trying to get a simple effect working in jQuery, and only have
Hi i have a simple accordion set up with jQuery with the HTML structure
I have a simple accordion type mechanism that I've been working on. I am
I have a simple accordion type page containing a list of H3 headers and
I have the following jquery that I wrote: $(document).ready(function(){ $('div.contentTxtBox#home').addClass('current').show(); $('a.menu').click(function() { $('div.contentTxtBox.current').hide(slide, {
I have a very simple accordion in my webpage that I initialise with :

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.