In this lesson, Colin shows you how to work with padding and margins to position your content. He also explains the difference between padding and margins by demonstrating on the CSS Box Model. As a reference, here are the CSS Box Model descriptions to help you understand the difference between padding, borders and margins:
CSS Box Model
- Content – The content of the box. i.e. Your text or image
- Padding – The area around the content. Padding is transparent
- Border – A border that goes around the padding and content – 0px = no border
- Margin – The area around the border. Margin is transparent