I added a 3rd div, floated div2
and div3
right, and floated div1
left.
I made div1
and div2
block elements, and centered div2
using margin: auto;
. Then I floated div3
right.
I expanded div1
too 200px, centered both divs with margin: auto;
, and used relative positioning on div2
to move it on top of div1
.
I switched colors, made both divs block elements and used relative positioning to move div2
to the right place.
I messed this up and copied over challenge 6. Come back to this one... I floated div1
right and then used a clearfix on div2
.
I positioned all divs using absolute positioning, and placed div2
and div3
within div1
.
I used absolute positioning again. div2
is inside div1
.
Same as challenge 7.
I used absolute positioning on div1
, then centered div2
using margin: auto;
and pulled it up using relative positioning. div3
was positioned using absolute positioning.
I put div1
in the center with display: block;
and margin: auto
, and used padding to bring it's child elements, div2
and div3
into the middle.
I hate that I've used absolute positioning several times because I've never really used it before it seems a bit hackish. Regardless, that's what I did here with div2
and div3
.
I did it the same way as challenge 11 but used some negative numbers on the absolute positioning.
I
I
I