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

  • Home
  • SEARCH
  • 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 9132035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:14:35+00:00 2026-06-17T08:14:35+00:00

Experimenting with the CSS3 box-shadow property, I was wondering if you could prevent the

  • 0

Experimenting with the CSS3 box-shadow property, I was wondering if you could prevent the object casting it to clip the shadow. In the following code the DIV casting the shadow is invisible, but the shadow is clipped nonetheless. Is there a way to get this done in CSS? Also maybe in JavaScript / JQuery? Or is the only way to set the box-shadow offset larger than the DIV, and reposition the shadow (not very elegant).

div#shadow
{
    position: absolute;
    background-color: transparent;
    top: 100px;     
    left: 100px;
    width: 300px;
    height: 200px;
    box-shadow: 100px 100px 100px gray;
}
  • 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-06-17T08:14:36+00:00Added an answer on June 17, 2026 at 8:14 am

    I am not a fan of position elements off the page, but that might be a good way of doing it?

    div#shadow {
        position: absolute;
        background-color: transparent;
        top: 100px;     
        left: -9999px;
        width: 300px;
        height: 200px;
        box-shadow: 10199px 100px 100px gray;
    }
    

    Give the left property a large negative value, then give the box-shadow‘s left property a figure calculated using this formula:

    0 - actual negative left + desired left + original box-shadow's left
    

    So for your example above, it would be:

    0 - -9999 + 100 + 100 = 10199
    

    You can see it working in this jsfiddle.

    The only other way I could see would be to match the border-radius and background-colour of the div so that it matched the shadow. The border-radius would be 100px in this case, but I couldn’t match the background-color at all and off course it would change with different colours or images.

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

Sidebar

Related Questions

Im experimenting with the following code private void timer1_Tick(object sender, EventArgs e) { Thread
I've been experimenting with CSS3 and found something strange. Heres's the part of DIV
Experimenting with arrays and wondering why the following DOESN'T seem to print the values
I've just been experimenting with a CSS tooltip that fades in with CSS3's transitions.
Experimenting with android game development. I'm using PNG format for images, and was wondering
While experimenting a bit with C++ templates I managed to produce this simple code,
I am experimenting with some css3 transitions. I put together a quick slider test
Was experimenting with interface inheritance and found this: interface String{} interface Object{} interface Exception{}
I'm experimenting with SWFUpload ( http://swfupload.org ) and I'm wondering if, in PHP, its
In experimenting with pickle, I've put together some code for a (very) simple blog.

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.