The Wayback Machine - https://web.archive.org/web/20160912193020/http://www.w3schools.com/w3css/w3css_padding.asp
THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML

W3.CSS Padding


Padding Classes

The w3-padding-number classes adds top and bottom padding to an HTML element:

w3-padding-4

I have 4px top and bottom padding

w3-padding-8

I have 8px top and bottom padding

w3-padding-16

I have 16px top and bottom padding

w3-padding-24

I have 24px top and bottom padding

w3-padding-32

I have 32px top and bottom padding

w3-padding-48

I have 48px top and bottom padding

w3-padding-64

I have 64px top and bottom padding

w3-padding-128

I have 128px top and bottom padding

Example

<div class="w3-container w3-padding-16">
  <p>I have 16px top and bottom padding.</p>
</div>
Try It Yourself »

The w3-padding-size classes adds padding to any HTML element:

The w3-padding-tiny class adds 2px top and bottom and 4px left and right.

The w3-padding-small class adds 4px top and bottom and 8px left and right.

The w3-padding-medium class adds 8px top and bottom and 16px left and right.

The w3-padding-large class adds 12px top and bottom and 24px left and right.

The w3-padding-xlarge class adds 16px top and bottom and 32px left and right.

The w3-padding-xxlarge class adds 24px top and bottom and 48px left and right.

The w3-padding-jumbo class adds 32px top and bottom and 64px left and right.

Example

<div class="w3-container w3-padding-xlarge">
  <p>I have 16px top and bottom padding and 32px left and right padding.</p>
</div>
Try It Yourself »

Morty Proxy This is a proxified and sanitized view of the page, visit original site.