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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:28:47+00:00 2026-06-18T08:28:47+00:00

I use box-shadow on the html element to give the background of a website

  • 0

I use box-shadow on the html element to give the background of a website a light vignette effect. But if the content of the site is longer than the window the box-shadow will only display in the part of the site which is viewable at the first glance. If you scroll down, the box-shadow stops working.

Here is my CSS code:

html {
    box-shadow: 0 0 200px rgba(0,0,0,0.9) inset;
    height: 100%;
}

body {
    font-family: "Source Sans Pro", sans-serif;    
    margin: 0;
    background: url('../img/subtle_grunge.png');
}

I tried to apply the box-shadow to the body element, but that won’t work either. Surprisingly the background-image set for the body works just fine. The problem appears in all browsers (Safari 6, Firefox 18, Chrome 24 – all on Mac).
Is there a solution?

Here is a example: http://dreamapp.de/sites/portfolio/boxshadowproblem.html

enter image description here

  • 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-18T08:28:48+00:00Added an answer on June 18, 2026 at 8:28 am

    You can put a <div> right after the <body> tag and move to it the CSS properties. Such as:

    HTML

    <body>
      <div class="vignette"></div>
      <!-- rest of your code -->
    

    CSS

    .vignette {
      position: fixed;
      /* to prevent empty space around the vignette */
      top: 0;
      left: 0;
      /* extends to the whole visible area */
      width: 100%;
      height: 100%;
      box-shadow: 0 0 200px rgba(0,0,0,0.9) inset;
    }
    

    in this way the element will stay under all the other elements and you can scroll the content.

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

Sidebar

Related Questions

I use the webkit/mozilla border radius and box shadow CSS properties, but I want
Whenever I use CSS3 style commands (like Box-shadow, Box-Sizing, background gradient,etc ) in my
CSS box-shadow works on Mozilla, but not on Chrome. If I use the class
Say you have a box and you use the box shadow css. How could
I would like to use WebKit's box-shadow css property for a little drop-down. The
My box-shadow stops if I use a parent div with overflow:auto. How do I
I use the following css code to help support box-shadow in IE7 and IE8:
I use the following HTML helper to generate check box: <%= Html.CheckBox(DeluxeFeature)%> Now I
When I try to apply a box shadow to my element that has a
I added a box-shadow to a section of a page recently to give it

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.