Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Adding Noise And Colour Overlay Over A Photo (CSS)

Featured Replies

I have a photo as a background to a div. But I want to add two more 'layers' on top of it.

#div-info{
  background-image: url(/img/photo.jpg);
}
  1. I want to add 'noise' on that photo, a png transparent texture.
  2. I want to add a colour overlay (I think overlay is the right word for this?) above that.

Can anyone help me? Thank you in advance for your help. I am new here and this is my first post!

  • Author

Hello @BrowserBugs. I hope you are well. Thank you for that lovely reply. I love this website and I am constantly finding articles there I enjoy.

However I have bad news.

header {
            height: 100vh;
            background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)), url('/img/creased-paper.png'), url('/img/photo.jpg');
}

It works for two images. Great! It works for the linear-gradient and one image. Great! But it will not work for the linear-gradient and two images together.

Compromise: It does not have to be a linear gradient, it can be just a colour with transparency.

Thank you in advance for your help and HAPPY FRIDAY!

Happy Friday! All good, was just a first thought, in which case try old school and multi-stack?

<div class="base"><div class="shade"></div></div>
.base{
  background: url('https://upload.wikimedia.org/wikipedia/commons/thumb/a/a9/Macaca_sinica_-_01.jpg/220px-Macaca_sinica_-_01.jpg') center no-repeat;
  height: 330px; width: 220px;
}
.shade{
  height: 100%; width: 100%; background: rgba(25, 25, 25, 0.25);
}

Fiddle here.

Hahaha I call it old school because before multiple backgrounds we used to have to stack containers. Have you live code of what you have or could you set up a fiddle so I can see?

Edit: Also look at css filters, a good example here. Normally the answer comes with a mix of ways to achieve things.

Edited by BrowserBugs

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.