I’m trying to get a shadow around my main content using this code:
.shadow {
-moz-box-shadow: 0px 0px 20px #2c2c2c;
-webkit-box-shadow: 0px 0px 20px #2c2c2c;
box-shadow: 0px 0px 20px #2c2c2c;
/* For IE 8 */
-ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=20, Direction=0, Color='#2c2c2c')";
/* For IE 5.5 - 7 */
filter: progid:DXImageTransform.Microsoft.Shadow(Strength=20, Direction=0, Color='#2c2c2c');
}
Which works like a charm when I wrap the shadow div around all main content including the footer like this:
But what I want is for the shadow to wrap around only the main content,
excluding the footer. When I end the shadow div after the right column(before the footer), the whole effect disappears:
If you move the shadow closing div before the footer then the floats are no longer cleared within .shadow and the height collapses to zero hence no shadow.
It worked perfectly! Thank you so much, I kept going around in circles.
What is the zoom:1.0; for?
This code is something that Weebly.com added in the process of publishing the site, it’s not from my original code. They also added in the last few lines of code:
That’s for IE6/7 to induce haslayout on the element so that it behaves (see faq on haslayout). It’s not valid css but will do no harm and safer than the alternatives.