Web_Designer
Web_Designer

Reputation: 74550

z-index issue with relative and absolute positioning combination

Please look at this example and show me how to make the blue <div> go behind the pink <div>. As you can see I have all ready tried this with the CSS z-index attribute, but without success.


[Update]

New Link Now my buttons in the blue div don't work.

Upvotes: 1

Views: 707

Answers (2)

Chinmayee G
Chinmayee G

Reputation: 8117

As mentioned in mozilla developer page, "stacking context is completely independent from its siblings: only descendant elements are considered when stacking is processed".

I suppose you cannot do it using zIndex but, you can make it invisible by using opacity.

Upvotes: 1

alex
alex

Reputation: 490273

jsFiddle.

Pink div has opacity so you can see the results.

The blue div can't be a child of the pink div.

Upvotes: 2

Related Questions