From the course: CSS Essential Training

Unlock this course with a free trial

Join today to access over 25,600 courses taught by industry experts.

Project: Heading resets and border styles

Project: Heading resets and border styles

From the course: CSS Essential Training

Project: Heading resets and border styles

- [Instructor] In the last project update, we added padding to the content wrap to create space between the text and the edge of the container elements for smaller screens. You may have noticed that adding this padding also caused the space between the header and the About section to disappear. Let's inspect the About heading. We can see that the default margin in the heading tag is still there, but if we inspect the content div, we'll see that the padding pushed the heading down into the container, so the space didn't actually disappear, it was just moved inside the container. If I remove the padding, the margin space from the header will push outside of the container. By adding padding to the content wrap, this also means that the space within the top of the About section now comes from two sources, the padding in the content wrap and the default margin in the H2 heading. Since padding is commonly added to…

Contents