Open In App

Foundation CSS Button Group Sizing

Last Updated : 14 Feb, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

Foundation CSS is an open-source & 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 & can be accessible to any device. It is used by many companies such as Facebook, eBay, Mozilla, Adobe, and even Disney. The framework is built on Saas-like bootstrap. It is more sophisticated, flexible, and easily customizable. It also comes with CLI, so it’s easy to use it with module bundlers. It offers the Fastclick.js tool for faster rendering on mobile devices.  

Buttons are one of the most common UI elements. To create the button, we will use the button class and use the button-group class to the container to make the button group element. The button Group Sizing option is used to create different sizes of buttons. The different sizes of button groups are tiny, small, and large.

Button Group Sizing Classes:

  • tiny: This class is used to create a tiny size button group.
  • small: This class is used to create a small button group.
  • large: This class is used to create a large button group.

Syntax:

<div class="Group-Sizing-Classes button-group">
  <a class="button">....</a>
  ....
</div>

Example 1: In this example, we will use <a> tag and button class to make a button and use button-group class to make the group of button elements. Also, use tiny, small, and large classes to make different sizes of button groups.

HTML




<!DOCTYPE html>
<html lang="en">
  
<head>
    <title>Foundation CSS Button Group Sizing</title>
  
    <!-- Compressed CSS -->
    <link rel="stylesheet"
          href=
        crossorigin="anonymous">
</head>
  
<body>
    <center>
        <h1 style="color:green;">
            GeeksforGeeks
        </h1>
  
        <h3>Foundation CSS Button Group Sizing</h3>
  
        <div class="button-group tiny align-center">
            <a class="button" href="#">
                GeeksforGeeks
            </a>
            <a class="button" href="#">
                Web Technology
            </a>
            <a class="button" href="#">
                HTML
            </a>
            <a class="button" href="#">
                CSS
            </a>
            <a class="button" href="#">
                JavaScript
            </a>
        </div>
  
        <div class="button-group small align-center">
            <a class="button" href="#">
                GeeksforGeeks
            </a>
            <a class="button" href="#">
                Web Technology
            </a>
            <a class="button" href="#">
                HTML
            </a>
            <a class="button" href="#">
                CSS
            </a>
            <a class="button" href="#">
                JavaScript
            </a>
        </div>
  
        <div class="button-group large align-center">
            <a class="button" href="#">
                GeeksforGeeks
            </a>
            <a class="button" href="#">
                Web Technology
            </a>
            <a class="button" href="#">
                HTML
            </a>
            <a class="button" href="#">
                CSS
            </a>
            <a class="button" href="#">
                JavaScript
            </a>
        </div>
    </center>
</body>
  
</html>


Output:

Foundation CSS Button Group Sizing

Example 2: In this example, we will use <button> tag and button class to make a button and use button-group to make the group of button elements. Also, use tiny, small, and large classes to make different sizes of button groups.

HTML




<!DOCTYPE html>
<html lang="en">
  
<head>
    <title>Foundation CSS Button Group Sizing</title>
  
    <!-- Compressed CSS -->
    <link rel="stylesheet" href=
        crossorigin="anonymous">   
</head>
  
<body>
    <center>
        <h1 style="color:green;">
            GeeksforGeeks
        </h1>
  
        <h3>Foundation CSS Button Group Sizing</h3>
  
        <div class="button-group tiny align-center">
            <button type="button" class="button">
                GeeksforGeeks
            </button>
            <button type="button" class="button">
                Web Technology
            </button>
            <button type="button" class="button">
                HTML
            </button>
            <button type="button" class="button">
                CSS
            </button>
            <button type="button" class="button">
                JavaScript
            </button>
        </div>
  
        <div class="button-group small align-center">
            <button type="button" class="button">
                GeeksforGeeks
            </button>
            <button type="button" class="button">
                Web Technology
            </button>
            <button type="button" class="button">
                HTML
            </button>
            <button type="button" class="button">
                CSS
            </button>
            <button type="button" class="button">
                JavaScript
            </button>
        </div>
  
        <div class="button-group large align-center">
            <button type="button" class="button">
                GeeksforGeeks
            </button>
            <button type="button" class="button">
                Web Technology
            </button>
            <button type="button" class="button">
                HTML
            </button>
            <button type="button" class="button">
                CSS
            </button>
            <button type="button" class="button">
                JavaScript
            </button>
        </div>
    </center>
</body>
</html>


Output:

Foundation CSS Button Group Sizing

Reference Link https://get.foundation/sites/docs/button-group.html#sizing



Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads