After creating the div elements and sizing plus coloring them with some CSS, I applied display: inline-block;
to line up the divs. Then I applied float: right;
to the second and third div to move the to the right side of the screen while leaving the the first div to the left. After that, I appplied margin-left: 10px;
to div two and three to create space between the second and third div elements.
Using the same markup from challenge 1, the divs started off to the left stacked on top of each other. I left div1 alone. For div2, I applied margin: 0 auto;
. This set the top and bottom margins to 0 and the left and right were set to be automatically calculated to be an equal size from the edge of the containing element which is the body. This centered div2. For div3, I set a float: right;
to move the div to the right most side of the screen.
text
text
text
text
text
text
text
text
text
text
text
text
text