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

You can put a
<div>right after the<body>tag and move to it the CSS properties. Such as:HTML
CSS
in this way the element will stay under all the other elements and you can scroll the content.