The Wayback Machine - https://web.archive.org/web/20240602082134/https://www.geeksforgeeks.org/foundation-css-prototyping-utilities-padding-helpers/
Open In App

Foundation CSS Prototyping Utilities Padding Helpers

Last Updated : 10 Mar, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

Foundation CSS is an open-source and responsive front-end framework built by ZURB foundation in September 2011, that makes it easy to layout stunning responsive websites, apps, and emails that appear amazing and can be accessible to any device. In this article, we will discuss the Prototyping Utilities Padding Helpers Classes in Foundation CSS.

In Foundation CSS, Prototyping Utilities Padding Helpers are used to create some space around the content of the element.

Foundation CSS Prototyping Utilities padding Helpers classes:

  • padding (all sides): This class can be used to apply padding along all the sides of the content.
  • padding top: This class can be used to apply padding on the top side of the content.
  • padding bottom: This class can be used to apply to pad on the bottom side of the content.
  • padding left: This class can be used to apply padding on the left side of the content.
  • padding right: This class can be used to apply padding on the right side of the content.
  • padding-horizontal: This class can be used to apply padding in the horizontal direction of the content.
  • padding-vertical: This class can be used to apply padding in the vertical direction of the content.

Syntax:

<div class="Utilities-padding-Helpers-classes">
     ...
</div>

Note: Here all means (0, 1, 2, 3). It is relative units with respect to 8px, means 0 = 0px, 1= 8px, 2 = 16px and 3 = 24px.

Example 1: Below is the example that illustrates the use of padding helpers using padding-all class.

HTML




<!DOCTYPE html>
<html>
  
<head>
    <title>Foundation CSS Prototyping Utilities Padding Helpers</title>
    <link rel="stylesheet"
          href=
          crossorigin="anonymous">
    <link rel="stylesheet"
          href=
          crossorigin="anonymous">
    <link rel="stylesheet"
          href=
          crossorigin="anonymous">
</head>
  
<body style="margin-inline: 30rem;">
    <center>
        <h2 style="color: green;">
            GeeksforGeeks
        </h2>
      
        <h3>Prototyping Utilities Padding Helpers</h3>
  
        <div class="callout clearfix alert">
            <div class="padding-0 callout">
              0 padding all around
              </div>
        </div>
        <br><br>
  
        <div class="callout clearfix warning">
            <div class="padding-1 callout">
              8px padding all around
              </div>
        </div>
        <br><br>
  
        <div class="callout clearfix primary">
            <div class="padding-2 callout">
              16px padding all around
              </div>
        </div>
        <br><br>
      
        <div class="callout clearfix success">
            <div class="padding-3 callout">
              24px padding all around
              </div>
        </div>
    </center>
</body>
  
</html>


Output:

Foundation CSS Prototyping Utilities Padding Helpers

Foundation CSS Prototyping Utilities Padding Helpers

Example 2: Below is the example that illustrates the use of padding helpers using padding-top-all class.

HTML




<!DOCTYPE html>
<html>
<head>
    <title>Foundation CSS Prototyping Utilities Padding Helpers</title>
    <link rel="stylesheet"
          href=
          crossorigin="anonymous">
    <link rel="stylesheet"
          href=
          crossorigin="anonymous">
    <link rel="stylesheet"
          href=
          crossorigin="anonymous">
</head>
  
<body style="margin-inline: 30rem;">
    <center>
        <h2 style="color: green;">
            GeeksforGeeks
        </h2>
      
        <h3>Prototyping Utilities Padding Helpers</h3>
  
        <div class="callout clearfix alert">
            <div class="padding-top-0 callout">
              0 padding-top
              </div>
        </div>
        <br><br>
  
        <div class="callout clearfix warning">
            <div class="padding-top-1 callout">
              8px padding-top
              </div>
        </div>
        <br><br>
  
        <div class="callout clearfix primary">
            <div class="padding-top-2 callout">
              16px padding-top
              </div>
        </div>
        <br><br>
  
        <div class="callout clearfix success">
            <div class="padding-top-3 callout">
              24px padding-top
              </div>
        </div>
    </center>
</body>
  
</html>


Output:

Foundation CSS Prototyping Utilities Padding Helpers

Foundation CSS Prototyping Utilities Padding Helpers

Example 3: Below is the example that illustrates the use of padding helpers using padding-vertical-all class.

HTML




<!DOCTYPE html>
<html>
  
<head>
    <title>Foundation CSS Prototyping Utilities Padding Helpers</title>
    <link rel="stylesheet" 
          href=
          crossorigin="anonymous">
    <link rel="stylesheet" 
          href=
          crossorigin="anonymous">
    <link rel="stylesheet"
          href=
          crossorigin="anonymous">
</head>
  
<body style="margin-inline: 30rem;">
  <center>
    <h2 style="color: green;">
        GeeksforGeeks
    </h2>
  
    <h3>Prototyping Utilities Padding Helpers</h3>
  
    <div class="callout clearfix alert">
        <div class="padding-vertical-0 callout">
          0 padding-vertical
        </div>
    </div>
    <br><br>
  
    <div class="callout clearfix warning">
        <div class="padding-vertical-1 callout">
          8px padding-vertical
        </div>
    </div>
    <br><br>
  
    <div class="callout clearfix primary">
        <div class="padding-vertical-2 callout">
          16px padding-vertical
        </div>
    </div>
    <br><br>
  
    <div class="callout clearfix success">
        <div class="padding-vertical-3 callout">
          24px padding-vertical
        </div>
    </div>
  </center>
</body>
  
</html>


Output:

Foundation CSS Prototyping Utilities Padding Helpers

Foundation CSS Prototyping Utilities Padding Helpers

Reference: https://get.foundation/sites/docs/prototyping-utilities.html#padding-helpers



Similar Reads

Foundation CSS Prototyping Utilities Text Helpers
Foundation CSS is an open-source and responsive front-end framework built by ZURB foundation in September 2011, that makes it easy to layout stunning responsive websites, apps, and emails that appear amazing and can be accessible to any device. In this article, we will discuss the Prototyping Utilities Text Helpers Classes in Foundation CSS. In Fou
3 min read
Foundation CSS Prototyping Utilities Margin Helpers
Foundation CSS is an open-source and responsive front-end framework built by ZURB foundation in September 2011, that makes it easy to layout stunning responsive websites, apps, and emails that appear amazing and can be accessible to any device. In this article, we will discuss the Prototyping Utilities Margin Helpers Classes in Foundation CSS. In F
3 min read
Foundation CSS Prototyping Utilities Component Styling
Foundation CSS is an open-source and responsive front-end framework built by ZURB foundation in September 2011, that makes it easy to layout stunning responsive websites, apps, and emails that appear amazing and can be accessible to any device. In this article, we will discuss the Prototyping Utilities Component Styling Classes in Foundation CSS. I
3 min read
Foundation CSS Prototyping Utilities Font Styling
A Foundation is an open-source and responsive front-end framework created by ZURB in September 2011 that makes it simple to create stunning responsive websites, apps, and emails that operate on any device. Many companies, like Facebook, eBay, Mozilla, Adobe, and even Disney, use it. The framework is based on bootstrap, which is similar to SaaS. It’
3 min read
Foundation CSS Prototyping Utilities Sizing
Foundation CSS is an open-source and responsive front-end framework built by ZURB foundation in September 2011, that makes it easy to layout stunning responsive websites, apps, and emails that appear amazing and can be accessible to any device. In this article, we will discuss the Prototyping Utilities Sizing Classes in Foundation CSS. In Foundatio
2 min read
Foundation CSS Prototyping Utilities Display Classes
Foundation CSS is an open-source and responsive front-end framework built by ZURB foundation in September 2011, that makes it easy to layout stunning responsive websites, apps, and emails that appear amazing and can be accessible to any device. In this article, we will discuss the Prototyping Utilities Display Classes in Foundation CSS. In Foundati
2 min read
Foundation CSS Prototyping Utilities Border None
Foundation CSS is an open-source and responsive front-end framework built by ZURB foundation in September 2011, that makes it easy to layout stunning responsive websites, apps, and emails that appear amazing and can be accessible to any device. In this article, we will discuss the Prototyping Utilities Margin Helpers Classes in Foundation CSS. In F
2 min read
Foundation CSS Prototyping Utilities Separator
Foundation CSS is an open-source &amp; responsive front-end framework built by ZURB foundation in September 2011, that makes it easy to design beautiful responsive websites, apps, and emails that look amazing &amp; can be accessible to any device. It is used by many companies such as Facebook, eBay, Mozilla, Adobe, and even Disney. The framework is
2 min read
Foundation CSS Prototyping Utilities Text Transformation
Foundation CSS is an open-source &amp; responsive front-end framework built by ZURB foundation in September 2011, that makes it easy to design beautiful responsive websites, apps, and emails that look amazing &amp; can be accessible to any device. It is used by many companies such as Facebook, eBay, Mozilla, Adobe, and even Disney. The framework is
3 min read
Foundation CSS Prototyping Utilities List Styling
A Foundation is an open-source and responsive front-end framework created by ZURB in September 2011 that makes it simple to create stunning responsive websites, apps, and emails that operate on any device. Many companies, like Facebook, eBay, Mozilla, Adobe, and even Disney, use it. The framework is based on bootstrap, which is similar to SaaS. It’
4 min read