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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T00:41:56+00:00 2026-05-31T00:41:56+00:00

I have a button image I’m using as a background image for some links.

  • 0
  • I have a button image I’m using as a background image for some links.
  • The background image has rounded corners.
  • I want to use a css drop shadow instead of putting the drop shadow in the image

The problem is, the drop shadow appears to be drawn around the element. Although I kind of expected to see the drop shadow color through the transparent parts of the background image, I’m seeing the background color instead (see this jsfiddle).

My actual goal is a little more complex, but if I can satify my first three bullet points then I can nail this task. Specifically, what I want to do is use two nested elements with background images of the right and left parts of a button image (rounded corners) so that I can use the same css to wrap a ‘button’ around text of any length. Since the backgrounds overlap in a css ‘sliding doors’ style, a png alpha drop shadow shows a 2x dark section where the images overlap. Soo.. I thought I’d use a css shadow, but as you can see in the jsFiddle, there are problems with that too.

Any ideas?

  • 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-31T00:41:57+00:00Added an answer on May 31, 2026 at 12:41 am

    Box-shadows don’t show through transparent backgrounds. A more simple test case would be:

    .box {
      width: 100px;
      height: 100px;
      margin: 20px;
      background-color: transparent;
      box-shadow: 0 0 10px #000;
    }​
    

    The output expected would be a nice blurred black square right? Well… no, it’s a white square with a dropshadow. http://jsfiddle.net/UjhrW/

    To achieve what you want to do you will need separate markup for the dropshadow, fill it with white, and then set the spill of the shadow so it looks like a blurry square…

    .box {
      width: 100px;
      height: 100px;
      margin: 20px;
      background-color: #000;
      box-shadow: 0 0 10px 6px #000;
    }​
    

    http://jsfiddle.net/Etmty/

    .box {
      width: 100px;
      height: 100px;
      margin: 20px;
      background-color: #000;
      box-shadow: 0 0 10px 6px #000;
    }
    <div class="box"></div>
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to have image button for browse and upload I have textbox using
I have a Tk::Button that has a folder image on it. On some occasions
Using CSS style Sheet I have the button images, I want to add a
I have the following css code. button.png is image where 3 button states are
i have a grid-view, which contains an asp image-button for deleting row, i want
I have a button that uses a stretchable PNG as the background image, like
I have one question. I want to set one image to image button. I
I currently have a button, which has an icon/image on it. I have configured
I have a image button and i want that image button when pressed it
I have an back button(Image Button) on the webview. I want to make this

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.