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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:11:11+00:00 2026-05-20T22:11:11+00:00

Is there a way to drop the shadow only on the bottom?. I have

  • 0

Is there a way to drop the shadow only on the bottom?. I have a menu with 2 images next to each other. I don’t want a right shadow because it overlaps the right image. I don’t like to use images for this so is there a way to drop it only on the bottom like:

box-shadow-bottom: 10px #FFF; or similar?

-moz-box-shadow: 0px 3px 3px #000;
-webkit-box-shadow: 0px 3px 3px #000;
box-shadow-bottom: 5px #000;
/* For IE 8 */
-ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=180, Color='#000000')";
/* For IE 5.5 - 7 */
filter: progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=180, Color='#000000');
  • 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-20T22:11:12+00:00Added an answer on May 20, 2026 at 10:11 pm

    UPDATE 4

    Same as update 3 but with modern css (=fewer rules) so that no special positioning on the pseudo element is required.

    #box {
        background-color: #3D6AA2;
        width: 160px;
        height: 90px;
        position: absolute;
        top: calc(10% - 10px);
        left: calc(50% - 80px);
    }
    
    .box-shadow:after {
        content:"";
        position:absolute;
        width:100%;
        bottom:1px;
        z-index:-1;
        transform:scale(.9);
        box-shadow: 0px 0px 8px 2px #000000;
    }
    <div id="box" class="box-shadow"></div>

    UPDATE 3

    All my previous answers have been using extra markup to get create this effect, which is not necessarily needed. I think this is a much cleaner solution… the only trick is playing around with the values to get the right positioning of the shadow as well as the right strength/opacity of the shadow. Here’s a new fiddle, using pseudo-elements:

    http://jsfiddle.net/UnsungHero97/ARRRZ/2/

    HTML

    <div id="box" class="box-shadow"></div>
    

    CSS

    #box {
        background-color: #3D6AA2;
        width: 160px;
        height: 90px;
        margin-top: -45px;
        margin-left: -80px;
        position: absolute;
        top: 50%;
        left: 50%;
    }
    
    .box-shadow:after {
        content: "";
        width: 150px;
        height: 1px;
        margin-top: 88px;
        margin-left: -75px;
        display: block;
        position: absolute;
        left: 50%;
        z-index: -1;
        -webkit-box-shadow: 0px 0px 8px 2px #000000;
           -moz-box-shadow: 0px 0px 8px 2px #000000;
                box-shadow: 0px 0px 8px 2px #000000;
    }
    

    UPDATE 2

    Apparently, you can do this with just an extra parameter to the box-shadow CSS as everyone else just pointed out. Here’s the demo:

    http://jsfiddle.net/K88H9/821/

    CSS

    -webkit-box-shadow: 0 4px 4px -2px #000000;
       -moz-box-shadow: 0 4px 4px -2px #000000;
            box-shadow: 0 4px 4px -2px #000000;
    

    This would be a better solution. The extra parameter that is added is described as:

    The fourth length is a spread
    distance. Positive values cause the
    shadow shape to expand in all
    directions by the specified radius.
    Negative values cause the shadow shape
    to contract.

    UPDATE

    Check out the demo at jsFiddle: http://jsfiddle.net/K88H9/4/

    What I did was to create a "shadow element" that would hide behind the actual element that you would want to have a shadow. I made the width of the "shadow element" to be exactly less wide than the actual element by 2 times the shadow you specify; then I aligned it properly.

    HTML

    <div id="wrapper">
        <div id="element"></div>
        <div id="shadow"></div>
    </div>
    

    CSS

    #wrapper {
        width: 84px;
        position: relative;
    }
    #element {
        background-color: #3D668F;
        height: 54px;
        width: 100%;
        position: relative;
        z-index: 10;
    }
    #shadow {
        background-color: #3D668F;
        height: 8px;
        width: 80px;
        margin-left: -40px;
        position: absolute;
        bottom: 0px;
        left: 50%;
        z-index: 5;
        -webkit-box-shadow: 0px 2px 4px #000000;
           -moz-box-shadow: 0px 2px 4px #000000;
                box-shadow: 0px 2px 4px #000000;
    }
    

    Original Answer

    Yes, you can do this with the same syntax you have provided. The first value controls the horizontal positioning and the second value controls the vertical positioning. So just set the first value to 0px and the second to whatever offset you’d like as follows:

    -webkit-box-shadow: 0px 5px #000000;
       -moz-box-shadow: 0px 5px #000000;
            box-shadow: 0px 5px #000000;
    

    For more info on box shadows, check out these:

    • http://www.css3.info/preview/box-shadow/
    • https://developer.mozilla.org/en/css/-moz-box-shadow#Browser_compatibility
    • http://www.w3.org/TR/css3-background/#the-box-shadow
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a drop down menu full of chemical elements. Is there any way
Is there a way to remove the drop shadow effect? I deleted the drop
Is there a way to make a drop down list have multiple selects? Holding
I am thinking about adding drop shadow to the bottom and right side of
Is there a way to programmatically force a Python script to drop into a
Is there a way to make Entity Framework 4.1 Code First NOT to drop
Is there a quick way to add a blank value to a drop down
Is there an easy way to reset a django database (i.e. drop all data/tables,
I have a semi-transparent view with a drop shadow. I mocked it up in
I want to be able to see a drop shadow, but not the object

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.