CSS - Style a Website
This course covers the basics of styling a website using CSS. Work your way through the videos and we'll teach you everything you need to know to style a basic website!

Margins & Padding

Lesson 4
Author : Mike Dane
Last Updated : October, 2017


Code

Copy<!-- Padding -->
<div style="padding: 50px;">
     Overall padding
</div>

<div style="padding-left: 50px; padding-right: 50px;">
     Individual side padding
</div>

<div style="padding: 50px 25px 50px 25px;">
     Four side padding in same line
</div>

<!-- Margin -->
<div style="margin: 50px;">
     Overall margin
</div>

<div style="margin-left: 50px; margin-right: 50px;">
     Individual side margin
</div>

<div style="margin: 50px 25px 50px 25px;">
     Four side margin in same line
</div>