I'm attempting to replicate effect number 2 from a website I found, but I'm running into an issue. Whenever I add more HTML content to the page, the effect disappears. Here is a sample of what I have so far: http://jsfiddle.net/aHrB7/
Here is a snippet of the HTML code:
<div class="header">
<img id="imgLogo" src="http://iconpacks.mozdev.org/images/firefox2005-icon.png" width=30px height=20px />
<div class="divContentSizer">
<span class="spnName">Master Chief</span>
</div>
<div class="clearfix"></div>
</div>
And here is the CSS I am using:
.clearfix {
*zoom: 1;
}
.header {
position: relative;
width: 100%;
background: #fff;
padding-top: 10px;
padding-bottom: 10px;
}
.header:before, .header:after {
z-index:-1;
position: absolute;
display:table;
content: "";
top:30px;
left: 10px;
width: 50%;
padding: .3em .3em;
max-width:300px;
background: rgba(0, 0, 0, 0.2);
-webkit-box-shadow: 0 15px 10px rgba(0,0,0, 0.2);
-moz-box-shadow: 0 15px 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 15px 10px rgba(0, 0, 0, 0.2);
-webkit-transform: rotate(-3deg);
-moz-transform: rotate(-3deg);
-o-transform: rotate(-3deg);
-ms-transform: rotate(-3deg);
transform: rotate(-3deg);
}
.header:after {
-webkit-transform: rotate(3deg);
-moz-transform: rotate(3deg);
-o-transform: rotate(3deg);
-ms-transform: rotate(3deg);
transform: rotate(3deg);
right: 10px;
left: auto;
}
#imgLogo {
float: left;
padding-left:30px;
}
.divContentSizer {
text-align: center;
vertical-align: middle;
width: 960px;
margin: 0 auto;
}
.spnName {
padding-top: 3px;
font-size: 1.5em;
color: #273137;
}
The problem seems to be with the header class div where the box shadows are supposed to appear. If anyone can offer some insight on why this is happening and how to fix it, I would greatly appreciate it! Thank you!