Why so complicated? Your solution was almost right except it's a way easier to make the pattern transparent and the background color solid. PNG can contain transparencies. So use photoshop to make the pattern transparent by setting the layer to 70% and resaving your image. Then you only need one selector. Works cross browser.
CSS:
.background {
background: url('../img/bg/diagonalnoise.png');/* transparent png image*/
background-color: rgb(248, 247, 216);
}
HTML:
<div class="background">
...
</div>
This are the basic. A usage example follows where I switched from background
to background-image
but both properties works the same.
body { margin: 0; }_x000D_
div {_x000D_
height: 110px !important;_x000D_
padding: 1em;_x000D_
text-transform: uppercase;_x000D_
font-family: Arial, Helvetica, sans-serif;_x000D_
font-weight: 600;_x000D_
color: white;_x000D_
text-shadow: 0 0 2px #333;_x000D_
}_x000D_
.background {_x000D_
background-image: url('https://www.transparenttextures.com/patterns/arabesque.png');/* transparent png image */_x000D_
}_x000D_
.col-one {_x000D_
background-color: rgb(255, 255, 0);_x000D_
}_x000D_
.col-two {_x000D_
background-color: rgb(0, 255, 255);_x000D_
}_x000D_
.col-three {_x000D_
background-color: rgb(0, 255, 0);_x000D_
}
_x000D_
<div class="background col-one">_x000D_
1. Background_x000D_
</div> _x000D_
<div class="background col-two">_x000D_
2. Background_x000D_
</div> _x000D_
<div class="background col-three">_x000D_
3. Background_x000D_
</div>
_x000D_
PLEASE WAIT A MINUTE! IT TAKES SOME TIME TO LOAD THE EXTERNAL PATTERNS.
This website seems to be rather slow...