Okan Kocyigit
Okan Kocyigit

Reputation: 13421

opacity and z-index on stacking order of elements

Here is my code, if you click on junction of divs you can see that divleft is the greatest stack in order. but I'm trying to set the greatest stack as "divright". z-index is not working,

How can I do that?

Thanks

Upvotes: 0

Views: 230

Answers (3)

lupos
lupos

Reputation: 374

http://jsfiddle.net/lupos/8aAKz/16/

I think your problem is that they did not have the same display style. One was floated and one wasn't. If you make them both block and force the over lap z-index works fine.

N/M duh. Position was the issue as the others said... which I also added. :P

Upvotes: 1

korywka
korywka

Reputation: 7653

z-index is nothing without position: relative or absolute: http://jsfiddle.net/8aAKz/14/

Upvotes: 1

Jeff Wilbert
Jeff Wilbert

Reputation: 4520

Simply add this to your divright class:

position: relative

Upvotes: 3

Related Questions