The box model can be a tricky part of writing CSS. In this video, you continue to apply the concepts to your projects.
- [Instructor] In this exercise, we'll start…with adjusting the default space between the sections.…None of the background colors have expanded…to enclose this space, so it must be coming…from the margin rather than the padding,…since it represents the area around an element.…Since there's a space between the header…and this Work Experience section, it's likely coming from…the bottom of this paragraph and the top of this header.…If we look between the Work section…and the Education section, there's also a space there.…
So, again, it's probably coming from…the header and the paragraph as well.…The same for the footer and the Education section.…So what we could do, to get rid of this space,…is to remove the margin from these elements.…But the problem is, the content within the sections…will be too close to the edge of its container.…Let me just demonstrate.…I'm going to go back to my CSS file,…and select my heading and my paragraph,…and set the margin to zero, to remove the space.…Now if I go back to my project,…
- Creating a CSS file
- Writing basic selectors
- Setting properties
- Using different typefaces and web-safe fonts
- Understanding cascading and inheritance
- Setting a font family, font size, text color, and more
- Understanding the box model
- Using the float property
Skill Level Beginner
1. Getting Started
2. CSS Core
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.