- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hey Everyone!
Anyone know of a method, preferably css, that would allow me to color overlay an image?
Think of it as if you were in Photoshop and brought up the Blending Options panel and applied a Color Overlay.
Thanks!
Well, you can do somthing like:

.overlay-img { position:relative; display:inline-block;}
.overlay-img:before {
content: ' ';
display: block;
position:absolute;
width:100%;
height:100%;
background: rgba(240, 210, 0, 0.3); /* rgb Color with alpha, you can also give it a bg color and set opacity: down. */
pointer-events: none;
}
But i would recommend taking a look at
If I had to achieve this effect, I’d first make a 1px x 1px 50% opacity (or whatever you want) colored png.
Then I’d do something like this:

div.holder {
position:relative
width:150px; height:150px;
}
img.overlayimg {
display:block;
position:relative;
z-index:100;
}
div.overlay_orange {
background:url(../images/overlay_orange.png) repeat;
position:absolute;
top:0; left:0;
width:100%; height:100%;
z-index:110;
}
Here is some CSS Overlay technique…CSS Color Overlay