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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T06:05:52+00:00 2026-05-20T06:05:52+00:00

I would like to take advantage of the new CSS3 box-shadow feature for a

  • 0

I would like to take advantage of the new CSS3 box-shadow feature for a site I am working on.
The problem is that Chrome 9.0.5 and Opera 10 do not render the inset border correctly if there is an img inside (the borders are hiddden around the image area).

I understand box-shadow is still work in progress, but I would expect browsers to fully support it or fully ignore it.

<!doctype html>
<html>
  <head>
    <style>
        div {
            border: 1px solid black;
            width: 300px;
            height: 200px;
            overflow: hidden;

            // CSS3 inset shade
            -moz-box-shadow: inset 0 0 20px red;
            -webkit-box-shadow: inset 0 0 20px red;
            box-shadow: inset 0 0 20px red;
        }
    </style>
  </head>
  <body>
        <div>
            <img src="http://www.google.com/images/logos/ps_logo2.png" width="364" height="126" alt="" />
        </div>
  </body>
</html>

Does one know some workaround to render the red shade correctly?

Thanks!

Edit: I am happy with the answer, but just wanted to add a live link to help other folks out there. Here it is

  • 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-20T06:05:52+00:00Added an answer on May 20, 2026 at 6:05 am

    Box-shadow is just above the background on the stacking order when using inset. Therefore, any image you have inside the div will cover the shadow.

    Per the W3C Specs

    In terms of stacking contexts and the
    painting order, the outer shadows of
    an element are drawn immediately below
    the background of that element, and
    the inner shadows of an element are
    drawn immediately above the background
    of that element (below the borders and
    border image, if any).

    In other words, Chrome and Opera are doing it correctly (FTR, FF 3.6.13 does the same thing as Opera).

    If you want the shadow to overlap the image, you have a few different options, depending on your needs:

    1. Set the image to the background property of the div.
    2. Absolutely position a div over the one with the image, make it the same size, and put the shadow there (not really recommended, as it’s convoluted and adds non-semantic markup).
    3. Make sure the backgrounds of the images are transparent (this will allow the shadow to show through, but non-transparent pixels will still cover the shadow).
    4. Consider using border-image and gradient, instead. (This one is also a little convoluted, but puts the gradient in the border itself, and you can fade to transparent using RGBA.)
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to take advantage of: Page.User.IsInRole(CustomRole); Page.User.Identity.IsAuthenticated when working inside Page methods,
I would like to take a field and replace all characters that are not
I would like to take the words of a sentence, if that word has
What I would like to take ownership of a hid device that may already
I'm working in python 2.6 and I would like to take gpmetisfile.txt.part.4 and return
I have a matrix in R that I would like to take a single
The company that I'm working is working with SVN but I would like to
I would like to take the Roman Numeral value stored in the object and
I would like to take a string representation of a set and parse it.
I would like to take a specific part of the last line of a

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.