Margin and Padding Challenge

Now it's important to note: padding adds spacing the the inside of a container, while margin adds spacing to the outside.

If we wanted to separate the black and blue containers below, padding would be an unwise choice, simply because it would extend the amount of space between the text and the containers edge, rather than actually pushing the containers away from each other.

Although this looks fine from a design standpoint, we want to push the containers apart in this instance.

Add a margin-top: 2rem; style to the dark blue container so that there's a 2rem sized gap in between the two.

index.html

Providing the lift to launch your development career

© 2024 Chris Courses. All rights reserved.