user532493
user532493

Reputation: 345

Image on Top of Another

I have a colored div that fills the entire top of the page, and an image I need on top of this colored div. The only problem is that the colored div goes on top of the image and the image can't be seen. I tried using z-image:-1 on the div but then my background image goes on top of the colored div. What can I do to fix this?

Upvotes: 0

Views: 312

Answers (1)

Scott Romack
Scott Romack

Reputation: 677

Give your divs a css position and they should obey the z-index:

.div1 {  
    position: relative;  /* or absolute */  
    z-index: 1;  
    }  

.div2 {  
    position: absolute;  /* or relative*/  
    z-index: 2;  
    } 

Upvotes: 1

Related Questions