For a grand cafe I am making a website using a full image background. I would like to have a pattern overlay on top of the image so I decided to use the background-size: cover property in combination with pseudo:after the following way:
.background,
.background:after {
width: 100%;
height:100%;
position: fixed;
top: 0;
left: 0;
z-index: 0;
}
.background {
background: url(../page_backgrounds/index.jpg) no-repeat center center fixed;
-moz-background-size: cover;
-webkit-background-size: cover;
-o-background-size: cover;
background-size: cover;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../page_backgrounds/index.jpg', sizingMethod='scale'
-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='../page_backgrounds/index.jpg', sizingMethod='scale')";
}
.background:after {
content: "";
background: url(../images/site/pattern.png) repeat;
z-index: 1;
}
The backgound: cover is working but the pseudo:after isn’t as you can see here.
The pattern image is in place as you can see here so that can’t be the reason.Is there something else I am doing wrong?