Vincent
Vincent

Reputation: 1750

How to use z-index to make an element overlap another element in CSS

First, here is the fiddle link on what I am stucked in: http://jsfiddle.net/FYHMV/

I would like box3 to overlap box1 and still have box3 inside box1 and below box2

The height of box1 keeps being adjusted to the height of box3, whereas I would like to have the height of box1 being adjusted to the content of box2.

I hope you will be able to help me on this one, thanks!

Upvotes: 1

Views: 637

Answers (1)

xbrady
xbrady

Reputation: 1703

Try changing box 3 to position: absolute;

Is this what you are looking to do?

http://jsfiddle.net/FYHMV/2/

To get your left style to work you also need box 1 to be set to position: relative

Upvotes: 2

Related Questions