The Wayback Machine - https://web.archive.org/web/20240712033443/https://www.geeksforgeeks.org/bootstrap-4-flex/
Open In App

Bootstrap 4 | Flex

Last Updated : 03 Feb, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

The flex classes are used to control the layout of flexbox components. 

Example: 

HTML




<!DOCTYPE html>
<html lang="en">
<head>
    <title>Flex</title>
    <meta charset="utf-8">
    <meta name="viewport"
        content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href=
    <script src=
    </script>
    <script src=
    </script>
    <script src=
    </script>
</head>
<body>
    <div class="container mt-3">
        <h1 style="color:green; text-align:center;">
            GeeksforGeeks
        </h1>
        <h2 style="text-align:center;">Flex</h2>
        <div class="d-flex bg-success p-3 text-white">
            <div class="p-2 bg-primary">Flexbox 1</div>
            <div class="p-2 bg-secondary ">Flexbox 2</div>
            <div class="p-2 bg-info">Flexbox 3</div>
        </div>
    </div>
</body>
</html>


Output: 
 

Inline Flexbox Container: The .d-inline-flex class is used to create an inline flexbox container.

Example:  

HTML




<!DOCTYPE html>
<html lang="en">
<head>
    <title>Flex</title>
    <meta charset="utf-8">
    <meta name="viewport"
        content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href=
    <script src=
    </script>
    <script src=
    </script>
    <script src=
    </script>
</head>
<body>
    <div class="container mt-3">
        <h1 style="color:green; text-align:center;">
            GeeksforGeeks
        </h1>
        <h2 style="text-align:center;">Inline Flexbox</h2>
        <div class="d-inline-flex bg-success p-3 text-white">
            <div class="p-2 bg-primary">Flexbox 1</div>
            <div class="p-2 bg-secondary ">Flexbox 2</div>
            <div class="p-2 bg-info">Flexbox 3</div>
        </div>
    </div>
</body>
</html>


Output: 
 

Horizontal Direction: The .flex-row class is used to display the flex items horizontally. By default the flexbox are placed horizontally. The .flex-row-reverse class is used to reverse the align of flexbox (right-align flexbox).

Example: 

HTML




<!DOCTYPE html>
<html lang="en">
<head>
    <title>Flex</title>
    <meta charset="utf-8">
    <meta name="viewport"
        content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href=
    <script src=
    </script>
    <script src=
    </script>
    <script src=
    </script>
</head>
<body>
    <div class="container mt-3">
        <h1 style="color:green; text-align:center;">
            GeeksforGeeks
        </h1>
        <h2 style="text-align:center;">Horizontal Flexbox</h2>
        <h3>flex-row class</h3>
        <div class="d-flex flex-row bg-success mb-3 text-white">
            <div class="p-2 bg-primary">Flexbox 1</div>
            <div class="p-2 bg-secondary ">Flexbox 2</div>
            <div class="p-2 bg-info">Flexbox 3</div>
        </div> <br>
        <h3>flex-row-reverse class</h3>
        <div class="d-flex flex-row-reverse
            bg-success mb-3 text-white">
            <div class="p-2 bg-primary">Flexbox 1</div>
            <div class="p-2 bg-secondary ">Flexbox 2</div>
            <div class="p-2 bg-info">Flexbox 3</div>
        </div>
    </div>
</body>
</html>


Output: 
 

Vertical Direction: The .flex-column class is used to display the flexbox vertically (stack to each other). The .flex-column-reverse class is used to put the flexbox vertically in reverse direction.

Example: 

HTML




<!DOCTYPE html>
<html lang="en">
<head>
    <title>Flex</title>
    <meta charset="utf-8">
    <meta name="viewport"
        content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href=
    <script src=
    </script>
    <script src=
    </script>
    <script src=
    </script>
</head>
<body>
    <div class="container mt-3">
        <h1 style="color:green; text-align:center;">
            GeeksforGeeks
        </h1>
        <h2 style="text-align:center;">Vertical Flexbox</h2>
        <h3>flex-column class</h3>
        <div class="d-flex flex-column text-white">
            <div class="p-2 bg-primary">Flexbox 1</div>
            <div class="p-2 bg-secondary ">Flexbox 2</div>
            <div class="p-2 bg-info">Flexbox 3</div>
        </div> <br>
        <h3>flex-column-reverse class</h3>
        <div class="d-flex flex-column-reverse text-white">
            <div class="p-2 bg-primary">Flexbox 1</div>
            <div class="p-2 bg-secondary ">Flexbox 2</div>
            <div class="p-2 bg-info">Flexbox 3</div>
        </div>
    </div>
</body>
</html>


Output: 
 

Justify Content: The .justify-content-* classes are used to change the alignment of flexbox. The alignment of flexbox can be start, end, center, between and around.

Example:  

HTML




<!DOCTYPE html>
<html lang="en">
<head>
    <title>Flex</title>
    <meta charset="utf-8">
    <meta name="viewport"
        content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href=
    <script src=
    </script>
    <script src=
    </script>
    <script src=
    </script>
</head>
<body>
    <div class="container mt-3">
        <h1 style="color:green; text-align:center;">
            GeeksforGeeks
        </h1>
        <h2 style="text-align:center;">
            Justify Content Flexbox
        </h2>
        <h5>justify-content-start class</h5>
        <div class="d-flex justify-content-start
            bg-success mb-3 text-white">
            <div class="p-2 bg-primary">Flexbox 1</div>
            <div class="p-2 bg-secondary ">Flexbox 2</div>
            <div class="p-2 bg-info">Flexbox 3</div>
        </div>
        <h5>justify-content-center class</h5>
        <div class="d-flex justify-content-center
            bg-success mb-3 text-white">
            <div class="p-2 bg-primary">Flexbox 1</div>
            <div class="p-2 bg-secondary ">Flexbox 2</div>
            <div class="p-2 bg-info">Flexbox 3</div>
        </div>
        <h5>justify-content-end class</h5>
        <div class="d-flex justify-content-end
            bg-success mb-3 text-white">
            <div class="p-2 bg-primary">Flexbox 1</div>
            <div class="p-2 bg-secondary ">Flexbox 2</div>
            <div class="p-2 bg-info">Flexbox 3</div>
        </div>
        <h5>justify-content-between class</h5>
        <div class="d-flex justify-content-between
            bg-success mb-3 text-white">
            <div class="p-2 bg-primary">Flexbox 1</div>
            <div class="p-2 bg-secondary ">Flexbox 2</div>
            <div class="p-2 bg-info">Flexbox 3</div>
        </div>
        <h5>justify-content-around class</h5>
        <div class="d-flex justify-content-around
            bg-success mb-3 text-white">
            <div class="p-2 bg-primary">Flexbox 1</div>
            <div class="p-2 bg-secondary ">Flexbox 2</div>
            <div class="p-2 bg-info">Flexbox 3</div>
        </div>
    </div>
</body>
</html>


Output: 
 

Fill/Equal Widths: The .flex-fill class is used to force the flex items into equal widths.

Example: 

HTML




<!DOCTYPE html>
<html lang="en">
<head>
    <title>Flex</title>
    <meta charset="utf-8">
    <meta name="viewport"
        content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href=
    <script src=
    </script>
    <script src=
    </script>
    <script src=
    </script>
</head>
<body>
    <div class="container mt-3">
        <h1 style="color:green; text-align:center;">
            GeeksforGeeks
        </h1>
        <h2 style="text-align:center;">
            Fill/Equal Width Flexbox
        </h2>
        <div class="d-flex mb-3">
            <div class="p-2 bg-primary flex-fill">
                Flexbox 1
            </div>
            <div class="p-2 bg-secondary flex-fill">
                Flexbox 2
            </div>
            <div class="p-2 bg-info flex-fill">
                Flexbox 3
            </div>
        </div>
    </div>
</body>
</html>


Output: 
 

Grow: The .flex-grow-1 class is used on flexbox to take the rest of space. 

Example:  

HTML




<!DOCTYPE html>
<html lang="en">
<head>
    <title>Flex</title>
    <meta charset="utf-8">
    <meta name="viewport"
        content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href=
    <script src=
    </script>
    <script src=
    </script>
    <script src=
    </script>
</head>
<body>
    <div class="container mt-3">
        <h1 style="color:green; text-align:center;">
            GeeksforGeeks
        </h1>
        <h2 style="text-align:center;">
            Grow Flexbox
        </h2>
        <div class="d-flex mb-3">
            <div class="p-2 bg-primary">
                Flexbox 1
            </div>
            <div class="p-2 flex-grow-1 bg-secondary">
                Flexbox 2
            </div>
            <div class="p-2 bg-success">
                Flexbox 3
            </div>
        </div>
    </div>
</body>
</html>


Output: 
 

Order: The .order class is used to change the order of flexbox. The valid order classes 
are from 0 to 12.

Example: 

HTML




<!DOCTYPE html>
<html lang="en">
<head>
    <title>Flex</title>
    <meta charset="utf-8">
    <meta name="viewport"
        content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href=
    <script src=
    </script>
    <script src=
    </script>
    <script src=
    </script>
</head>
<body>
    <div class="container mt-3">
        <h1 style="color:green; text-align:center;">
            GeeksforGeeks
        </h1>
        <h2 style="text-align:center;">
            Order Flexbox
        </h2>
        <div class="d-flex mb-3">
            <div class="p-2 bg-primary order-3">
                Flexbox 1
            </div>
            <div class="p-2 bg-secondary order-1">
                Flexbox 2
            </div>
            <div class="p-2 bg-success order-2">
                Flexbox 3
            </div>
        </div>
    </div>
</body>
</html>


Output: 
 

Auto Margins: The .mr-auto and .ml-auto classes are used to add margins to the item. The .mr-auto class pushes the item to the right and .ml-auto class pushes the item to the left.

Example: 

HTML




<!DOCTYPE html>
<html lang="en">
<head>
    <title>Flex</title>
    <meta charset="utf-8">
    <meta name="viewport"
        content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href=
    <script src=
    </script>
    <script src=
    </script>
    <script src=
    </script>
</head>
<body>
    <div class="container mt-3">
        <h1 style="color:green; text-align:center;">
            GeeksforGeeks
        </h1>
        <h2 style="text-align:center;">Auto Margins</h2>
        <div class="d-flex bg-success mb-3 text-white">
            <div class="p-2 bg-primary">
                Flexbox 1
            </div>
            <div class="p-2 mr-auto bg-secondary ">
                Flexbox 2
            </div>
            <div class="p-2 mr-auto bg-info">
                Flexbox 3
            </div>
        </div>
        <div class="d-flex bg-success mb-3 text-white">
            <div class="p-2 bg-primary">
                Flexbox 1
            </div>
            <div class="p-2 ml-auto bg-secondary ">
                Flexbox 2
            </div>
            <div class="p-2 bg-info">
                Flexbox 3
            </div>
        </div>
    </div>
</body>
</html>


Output: 
 

Wrap: The .flex-nowrap (default), .flex-wrap or .flex-wrap-reverse classes are used to control the wrap of flex items.

Example: 

HTML




<!DOCTYPE html>
<html lang="en">
<head>
    <title>Flex</title>
    <meta charset="utf-8">
    <meta name="viewport"
        content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href=
    <script src=
    </script>
    <script src=
    </script>
    <script src=
    </script>
</head>
<body>
    <div class="container mt-3">
        <h1 style="color:green; text-align:center;">
            GeeksforGeeks
        </h1>
        <h2 style="text-align:center;">Flex Wrap</h2>
        <h4>flex-nowrap class</h4>
        <div class="d-flex flex-nowrap bg-success">
            <div class="p-2 border">
                Welcome to GeeksforGeeks 1
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 2
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 3
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 4
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 5
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 6
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 7
            </div>
        </div>
        <br><br>
        <h4>flex-wrap class</h4>
        <div class="d-flex flex-wrap bg-success">
            <div class="p-2 border">
                Welcome to GeeksforGeeks 1
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 2
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 3
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 4
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 5
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 6
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 7
            </div>
        </div>
        <br><br>
        <h4>flex-wrap-reverse class</h4>
        <div class="d-flex flex-wrap-reverse bg-success">
            <div class="p-2 border">
                Welcome to GeeksforGeeks 1
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 2
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 3
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 4
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 5
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 6
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 7
            </div>
        </div>
    </div>
</body>
</html>


Output: 
 

Align Content: The .align-content-* classes are used to set the vertical alignment of flex items. The list of all classes are: .align-content-start (default), .align-content-end, .align-content-center, .align-content-between, .align-content-around and .align-content-stretch.
Note: The align content works for more than one rows of flex items.

Example: 

HTML




<!DOCTYPE html>
<html lang="en">
<head>
    <title>Flex</title>
    <meta charset="utf-8">
    <meta name="viewport"
        content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href=
    <script src=
    </script>
    <script src=
    </script>
    <script src=
    </script>
</head>
<body>
    <div class="container mt-3">
        <h1 style="color:green; text-align:center;">
            GeeksforGeeks
        </h1>
        <h2 style="text-align:center;">Align Content</h2>
        <h4>align-content-start class</h4>
        <div class="d-flex flex-wrap
            align-content-start border"
            style="height:250px">
            <div class="p-2 border">
                Welcome to GeeksforGeeks 1
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 2
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 3
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 4
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 5
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 6
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 7
            </div>
        </div>
        <br>
        <h4>align-content-around class</h4>
        <div class="d-flex flex-wrap
            align-content-around border"
            style="height:250px">
            <div class="p-2 border">
                Welcome to GeeksforGeeks 1
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 2
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 3
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 4
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 5
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 6
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 7
            </div>
        </div>
        <br>
        <h4>align-content-stretch class</h4>
        <div class="d-flex flex-wrap
            align-content-stretch border"
            style="height:250px">
            <div class="p-2 border">
                Welcome to GeeksforGeeks 1
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 2
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 3
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 4
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 5
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 6
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 7
            </div>
        </div>
    </div>
</body>
</html>


Output: 

Align Items: The .align-items-* classes are used to control the vertical alignment of flex items. The list of all classes are: .align-items-start, .align-items-end, .align-items-center, .align-items-baseline, and .align-items-stretch (default).

Example: 

HTML




<!DOCTYPE html>
<html lang="en">
<head>
    <title>Flex</title>
    <meta charset="utf-8">
    <meta name="viewport"
        content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href=
    <script src=
    </script>
    <script src=
    </script>
    <script src=
    </script>
</head>
<body>
    <div class="container mt-3">
        <h1 style="color:green; text-align:center;">
            GeeksforGeeks
        </h1>
        <h2 style="text-align:center;">Align Items</h2>
        <h4>align-items-end class</h4>
        <div class="d-flex align-items-end border"
            style="height:150px">
            <div class="p-2 border">
                Welcome to GeeksforGeeks 1
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 2
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 3
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 4
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 5
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 6
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 7
            </div>
        </div>
        <br>
        <h4>align-items-baseline class</h4>
        <div class="d-flex align-items-baseline border"
            style="height:150px">
            <div class="p-2 border">
                Welcome to GeeksforGeeks 1
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 2
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 3
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 4
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 5
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 6
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 7
            </div>
        </div>
        <br>
        <h4>align-items-stretch class</h4>
        <div class="d-flex align-items-stretch border"
            style="height:150px">
            <div class="p-2 border">
                Welcome to GeeksforGeeks 1
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 2
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 3
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 4
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 5
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 6
            </div>
            <div class="p-2 border">
                Welcome to GeeksforGeeks 7
            </div>
        </div>
    </div>
</body>
</html>


Output: 
 

Align Self: The .align-self-* classes are used to control the vertical alignment of flex items. The list of all classes are: .align-self-start, .align-self-end, .align-self-center, .align-self-baseline, and .align-self-stretch (default).

Example: 

HTML




<!DOCTYPE html>
<html lang="en">
<head>
    <title>Flex</title>
    <meta charset="utf-8">
    <meta name="viewport"
        content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href=
    <script src=
    </script>
    <script src=
    </script>
    <script src=
    </script>
</head>
<body>
    <div class="container mt-3">
        <h1 style="color:green; text-align:center;">
            GeeksforGeeks
        </h1>
        <h2 style="text-align:center;">Align Self</h2>
        <h4>align-items-end class</h4>
        <div class="d-flex" style="height:250px">
            <div class="p-2 border align-self-start">
                Welcome to GeeksforGeeks 1
            </div>
            <div class="p-2 border align-self-center">
                Welcome to GeeksforGeeks 2
            </div>
            <div class="p-2 border align-self-end">
                Welcome to GeeksforGeeks 3
            </div>
            <div class="p-2 border align-self-baseline">
                Welcome to GeeksforGeeks 1
            </div>
            <div class="p-2 border align-self-stretch">
                Welcome to GeeksforGeeks 2
            </div>
        </div>
    </div>
</body>
</html>


Output: 

Supported Browser:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari


Previous Article
Next Article

Similar Reads

Bootstrap 5 Flex Enable Flex Behaviors
Bootstrap 5 Enable Flex Behaviors are used to apply display utilities to create a flexbox container and transform direct children elements into flex items. With more flex properties, flex items and containers can be further modified. Utility classes: .d-flex: It displays an element as a flex container..d-inline-flex: It displays an element as an in
2 min read
Bulma Flex grow and flex shrink
Bulma is an Open source CSS framework developed by Jeremy Thomas. This framework is based on the CSS Flexbox property. It is highly responsive, minimizing the use of media queries for responsive behavior. In this article, we will learn about Bulma flex-grow and flex-shrink properties. The Bulma framework allows the users to use CSS flex-shrink and
2 min read
What is the difference between display:inline-flex and display:flex in CSS ?
In this article, we will see the display property &amp; its values, i.e. the inline-flex &amp; flex, in order to specify the display behavior of an element, along with understanding their basic differences &amp; will illustrate them through the examples. Both CSS display: inline-flex and display: flex properties are used to create flexible layouts.
3 min read
Bootstrap 5 Flex Align Self
Bootstrap5 Flex Align Self property is used to change each item's alignment individually on the cross-axis. By default, it starts from the y-axis, if we want to change the alignment on the x-axis change the value of the class flex-direction to the column. There are some classes that can be used to set the alignment. Flex Align Self class: align-sel
3 min read
How to put items underneath each other flex box in Bootstrap 4 ?
Flexbox in Bootstrap 4: From bootstrap 3 to bootstrap 4 amazing change has occurred that bootstrap 4 can utilize flexbox to handle the layout of content. The FlexBox Layout Module makes it easier to design a flexible responsive layout structure. Approach: Place the direction of flex items in a flex container with direction utilities. In most cases,
3 min read
Bootstrap 5 Flex Media object
Bootstrap 5 Flex Media object class can be used to align images or videos to the left or right with content in an easy and efficient manner. The Bootstrap Flex Media object is used where some data is positioned alongside content to build up complicated. Bootstrap 5 Flex Media object classes: There is no pre-defined class for flex media objects we c
2 min read
Bootstrap 5 Flex Auto margins with align-items
Bootstrap 5 Flex Auto margins with align-items are used to place the flex items vertically on top or bottom of the container using the Bootstrap classes. Flex Auto margins with align-items used classes: align-items: This class is used to set the alignment of the flex items.flex-direction: This class is used to set the direction of flex items in a c
2 min read
Bootstrap 5 Spinners Flex Placements
Bootstrap5 Spinner Flex Placements is a display utility that is used to place the spinner in a flexbox, where the spinner is placed inside the flexbox container using the .d-flex class. Spinners Flex Placements Class: d-flex: This is a flexbox helper class and it is used to have the Flex Placement.Syntax: &lt;div class="d-flex"&gt; &lt;div class="s
2 min read
Bootstrap 5 Flex Order
Bootstrap 5 Flex order class can be used to set the order of the flex items inside the flex irrespective of their position in the DOM. We have to select options to make an item first or the last remaining items will follow the order. The order takes integer values from 0-5 and some custom values are also used. FBootstrap 5 Flex Order Classes: The '
2 min read
Bootstrap 5 Flex Grow and shrink
Bootstrap 5 Flex Grow and shrink is used to apply the expanding and shrinking look to an HTML div in a flexbox. By default, all the flex items will have the width/size until specified. When we add the .flex-grow-1 to a flex item it expands and covers up all the space which is available to it. Adding the .flex-grow-0 will keep the width of the flex-
3 min read
three90RightbarBannerImg