Open In App

Foundation CSS XY Grid

Foundation CSS is an open-source and responsive front-end framework built by the 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 know about XY Grid in Foundation CSS.



The following page describes the features of XY Grid along with the description.

Example 1: This example illustrates the use of XY Block Grids






<!DOCTYPE html>
<html lang="en">
  
<head>
    <title>Foundation CSS XY Block Grids</title>
  
    <!-- Compressed CSS -->
    <link rel="stylesheet" href=
  
    <!-- Compressed JavaScript -->
    <script src=
    </script>
</head>
  
<body style="margin-inline:10rem;">
  
    <h1 style="color:green">
        GeeksforGeeks
    </h1>
      
    <h3>Foundation CSS XY Block Grids </h3>
  
    <div class="grid-x grid-padding-x 
        small-up-2 medium-up-4 large-up-6">
        <div class="cell" 
            style="background-color:blue">
            gfg
        </div>
        <div class="cell" 
            style="background-color:rgb(140, 160, 151)">
            gfg
        </div>
        <div class="cell" 
            style="background-color:blue">
            gfg
        </div>
        <div class="cell" 
            style="background-color:rgb(0, 255, 191)">
            gfg
        </div>
    </div>
</body>
  
</html>

Output:

 

Example 2: Below is the example that illustrates the use of grid gutters with the grid-padding-x class.




<!DOCTYPE html>
<html lang="en">
  
<head>
    <title>Foundation CSS XY Grid Gutters</title>
  
    <!-- Compressed CSS -->
    <link rel="stylesheet" href=
</head>
  
<body style="margin-inline:10rem;">
    <center>
        <h1 style="text-align:center;color:green">
            GeeksforGeeks
        </h1>
  
        <h3>Foundation CSS XY Grid Gutters</h3>
  
        <div class="callout" style="border:2px solid black;">
            <div class="grid-x grid-padding-x">
                <div class="cell medium-6 large-4" 
                    style="background-color:blanchedalmond">
                    GFG Gutters
                </div>
                <div class="cell medium-4 large-8" 
                    style="background-color:rgb(40, 157, 220)">
                    GFG Gutters
                </div>
            </div>
        </div>
    </center>
</body>
  
</html>

Output:

 

Reference: https://get.foundation/sites/docs/xy-grid.html


Article Tags :