Ryan S
Ryan S

Reputation: 3268

CSS Two Images Over Each Other

I have two images, one should go slightly above like this one. enter image description here

This is what I have so far: http://www.ryansammut.com/orijen/products.html At the moment if I put it slightly downwards, the other image will get over the dogs image.

Upvotes: 3

Views: 9039

Answers (2)

meo
meo

Reputation: 31249

you can solve this giving your dogs image a higher z-index then the other one. (or just put it in the right order in the DOM)

In your case:

#dogsProducts {
 ...
 z-index: 2;
}

result:

dog website zindex problem

Upvotes: 5

Gabriele Petrioli
Gabriele Petrioli

Reputation: 195972

Edit the #dogsProducts rule and set its z-index to 1000 (something big).

#dogsProducts {
  height: auto;
  left: 430px;
  position: absolute;
  top: 830px;
  z-index: 1000;
}

Upvotes: 1

Related Questions