CSS color overlay. Well, you should not think that we are stressing on user experience and design. There is more to it. According to the web accessibility guidelines, links must come with a distinction. Else, the users might find it hard to figure out where they are on the page. We are going to explore CSS color overlay and image overlay CSS. If you look at the before and after, you can see that this method makes the light tones lighter and the dark tones darker while softening it a touch. Basically, it softly boosts the contrast. If you want a more dramatic effect, try changing the blending mode to ‘Vivid Light’ instead of ‘Overlay.’. If you want to compare two pictures in the real world you will place them side by side. But in digital there's a better way to do it, and that is by overlap. This technique allows you to spot the smallest differences between two items.
- Before And Aftercompare Images Through Overlap Rows
- Before And Aftercompare Images Through Overlap Shapes
Select two pictures on your computer or phone and then click OK button at the bottom of this page. All other settings already installed by default.
Example of overlaying one jpg picture to another jpg picture with all default settings:
+ =
Example of overlaying one jpg picture to another jpg picture with changed size and without transparency:
+ =
To make result, as in the above example, it is needed to set next parameters:
1) Transparency of 2nd image — '0%';
2) Automatic resizing of the 2nd picture — 'use manual resizing in %';
3) Size of the 2nd picture relative to 'width and height' of the 1st picture — '45%'.
And rest unchanged, as it was set by default.

Example of overlaying PNG image with transparent background on JPG photo:
+ =
To do this, select the following parameter:
1) Overlay type for 2nd image — 'Overlay PNG, GIF, TIFF image with transparent background'.
And leave other settings as they were set by default.
Example of overlaying PNG image with manual resizing, with positioning and offset:
+ =
To do this, it is needed to set the following parameters:
1) Overlay type for 2nd image — 'Overlay PNG, GIF, TIFF image with transparent background';
2) Automatic resizing of the 2nd picture — 'use manual resizing in %';
3) Size of the 2nd picture relative to 'width and height' of the 1st picture — '30%';
4) Positioning of the 2nd image over the 1st — 'right bottom';
5) Offset of the 2nd picture — 'on the X-axis:30 and Y-axis:30 in px (pixels)'.
Other settings remain unchanged.
To overlay photoframe, for example, in PNG format with transparency, you can use this parameters:
1) Overlay type for 2nd image — 'Overlay PNG, GIF, TIFF image with transparent background';
2) Automatic resizing of the 2nd picture — 'enabled, but on the contrary, 1st picture will be adjusted to the size of 2nd'.
The rest should be left as it was set by default.
Overlayed (imposed) from above picture should always be selected as 2nd image file. Both original images will not change. You will be given other processed image.
July 2020: This post is archived - since I moved to Gridsome some of the formatting is messed up. This is on my todo list to update.
Adding a background image to a <div> (or any other tag) is easy using CSS. Here it is (without gradient yet - scroll down for the gradient image css):
I've put some other rules on the div to set the background image to fill the whole div (cropping if needed) with the background-size: cover. The width is 80%, so resize your browser to see how this background-size works. (It will crop the image to ensure it fits correctly).

How to add a gradient on top of a background image?
If you wanted to add a semi opaque/semi transparent colour gradient that goes on top of the background image, your first thought might be to overlay another div (or use the :after css selector).
However, the easiest way to do it is to just add another parameter to the background-image css rule.
Take a look!
Both divs are using the same background image, but the second one has a linear-gradient on it. The rgba(x,y,z,o) is the colour (first three numbers = red/green/blue. The 4th param (0.52) is the opacity - 1.0 is fully visible, 0.0 is invisible).
How to add a gradient background to a div without using images
Before And Aftercompare Images Through Overlap Rows
You can also easily add a gradient background to a div (or any other HTML element) without using images, using the following CSS rules.
BTW, I've set the gradient to start at red and end in blue. It might not look pretty, but it is so you can click the buttons below to swap its position, and quickly work out what direction it is facing.
Before And Aftercompare Images Through Overlap Shapes
RELATED POSTS




