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 4542788
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T15:26:24+00:00 2026-05-21T15:26:24+00:00

I am using drop-down menus with my main navigation links and need to add

  • 0

I am using drop-down menus with my main navigation links and need to add a one pixel drop-shadow around everything (the current nav button/link (that has rounded corners using border-radius) and the entire sub-nav element that drops down).

I’ve posted a demo of it on JSFiddle:

http://jsfiddle.net/thebluehorse/TFqjR/2/

Can someone update it or to me what to do to make it have a one pixel drop shadow around everything when hoving over the nav link? Note that it needs to go around the rounded corners in the main nav. It needs to support IE7+, but I guess if box-shadow is used then CSS3 Pie can be used as a helper.

Any help would be greatly appreciated. This thing has been driving me crazy.

  • 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-21T15:26:25+00:00Added an answer on May 21, 2026 at 3:26 pm

    There are a number of ways to achieve your goal. The simplest is to set a static class to your nested ul elements. This is because they are only ever visible when they are triggered by the parent’s hover event. Example: http://jsfiddle.net/deloretta/gspnK/ (note: to prevent the text inside the parent element from “jumping” about, you could try adding a padding of 1px to the element and removing it on hover, or aligning text centrally, or whatever method you like).

    Secondly, the more inefficient way (but has it’s uses which I wont go in to here) you can find out if this element has children and apply the class to them like so: http://jsfiddle.net/deloretta/XVrr6/

    Ideally, the IE7+ styles would reside in their own style sheet (as IE7+ supports the !important syntax) and you could access them using conditional comments. Basically, strip out the border properties and place them into an IE specific stylesheet. IE will ignore the -moz- and -webkit- declarations and render the border properties correctly, whilst moz/webkit ignore the conditional comments and render the box shadow. Lovely jubbly.

    Hope this helps!

    EDIT – response to your initial comment:

    I think I understand your comment. If not, let me know and I will try to help further.

    To make this work with conditional comments you should separate the two styles. One specific for IE and the other for all other browsers. You can do that like this:

    <link rel="stylesheet" type="text/css" href="/style.css">
    <!--[if IE]>
    <link rel="stylesheet" type="text/css" href="/style_ie.css"> 
    <![endif]-->
    

    You should then modify your existing stylesheet to contain this information:

    #nav #link1.selected > a {
      padding-bottom: 10px;
      margin-bottom: 0;
      -webkit-border-radius: 5px 5px 0 0;
         -moz-border-radius: 5px 5px 0 0;
              border-radius: 5px 5px 0 0;
      /*the border declaration used to be here
      but we moved to another stylesheet
      specifically for IE*/
      -webkit-box-shadow:0px 1px 1px #f0f;
      -moz-box-shadow:0px 1px 1px #f0f;
    }
    .static_class{
      /*border used to be here*/
      -webkit-box-shadow:0px 1px 1px #f0f;
      -moz-box-shadow:0px 1px 1px #f0f;
    }
    

    Next, create a separate style sheet called styles_ie.css – this will house the border information we removed from the other stylesheet. Like so:

    #nav #link1.selected > a {
      border-bottom:1px solid #f0f;
      border-left:1px solid #f0f;
      border-right:1px solid #f0f;
    }
    .static_class{
      border-bottom:1px solid #f0f;
      border-left:1px solid #f0f;
      border-right:1px solid #f0f;
    }
    

    So… What happens?

    Internet Explorer is the only browser that supports conditional comments. So when Firefox, Safari or Chrome lands on the page, they ignore the comments, and consequently, don’t render the style sheet linked in the comments.
    When Internet Explorer lands on the page, it renders everything it understands from the styles.css – ignoring the border-radius and box-shadow properties and so on (because it doesn’t understand them). It then moves on to the conditional comments (which it understands) then loads up the style sheet styles_ie.css and then applies the extra style to the elements. Easy-peasy, lemon-squeezy :]

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

Sidebar

Related Questions

I have two drop down menus, one of which I am trying to replace
I am using a very cool jquery drop down menu by Zach at One
I have javascript dropdown menus using jquery css and ul li. When they drop
I am developing a website linked here with 3-level dropdown menus (main, and 2
I am building an e-commerce site and am wondering if having 2 identical navigation
I am using Google Maps API 3 to show a google map of Canada
I usually write scripts for Illustrator and save them in the scripts folder. Then
I am new to extJS, and trying to implement the following functionality: I have
This is a bit complicated so bear with me: On FORM.php, I have 2
Does anyone know if there is a way I can get the XCode method/class

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.