HYBR1D
HYBR1D

Reputation: 462

How to make a foreground image using CSS?

I've got this image and i want to put it over my website as a foregound. It should overlap the background and the elements. I'm using CSS.

https://www.dropbox.com/s/aawxonln4h1i5dt/Snow.png?dl=0

Upvotes: 2

Views: 16389

Answers (1)

Slava Knyazev
Slava Knyazev

Reputation: 6081

If I understand correctly you want something like this:

Html (place somewhere on top):

<img src="URL_TO_IMAGE" id="overlay"/>

CSS:

#overlay{
width:100%;
position:absolute; /*You may also use fixed depending on your needs.*/
left:0;
top:0; /*If you want it at the bottom you probably want bottom:0 instead*/
z-index: 999;
}

Upvotes: 3

Related Questions