Topic: CSS Basics

Margins – CSS

Preview

To change the margins of an element using CSS, use the following properties:

  margin-top: 10px;
  margin-right: 20px;
  margin-bottom: 30px;
  margin-left: 40px;

To view this and the other 300+ tutorials on Simple Dev, sign up for a 10-day free trial.