Horje
Foundation CSS Button Group Basics

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.

Button Group Basic Class:

  • button-group: This class is used to create a basic button group element.

Syntax:

<div class="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 to make the group of button elements.

HTML

<!DOCTYPE html>
<html lang="en">
  
<head>
    <title>Foundation CSS Button Group Basics</title>
  
    <!-- Compressed CSS -->
    <link rel="stylesheet" href=
        crossorigin="anonymous">
      
</head>
  
<body>
    <center>
        <h1 style="color: green;">
            GeeksforGeeks
        </h1>
  
        <h3>Foundation CSS Button Group Basics</h3>
  
        <div class="button-group 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 Basics

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.

HTML

<!DOCTYPE html>
<html lang="en">
  
<head>
    <title>Foundation CSS Button Group Basics</title>
  
    <!-- Compressed CSS -->
    <link rel="stylesheet" href=
        crossorigin="anonymous">  
</head>
  
<body>
    <center>
        <h1 style="color:green;">
            GeeksforGeeks
        </h1>
  
        <h3>Foundation CSS Button Group Basics</h3>
  
        <div class="button-group 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 Basics

Reference link: https://get.foundation/sites/docs/button-group.html#basics




Reffered: https://www.geeksforgeeks.org


CSS

Related
Foundation CSS Button Group Sizing Foundation CSS Button Group Sizing
Bulma Right aligned Dropdown Bulma Right aligned Dropdown
Semantic-UI Icon Bordered Variation Semantic-UI Icon Bordered Variation
Semantic-UI Icon Circular Variation Semantic-UI Icon Circular Variation
Semantic-UI Icon Size Variation Semantic-UI Icon Size Variation

Type:
Geek
Category:
Coding
Sub Category:
Tutorial
Uploaded by:
Admin
Views:
9