Author: saqibkhan

  • Navigation Demo

    What is a navbar?

    The Bootstrap navbar is a responsive navigation header at the top of a webpage. It can expand or collapse based on the screen size, providing a user-friendly navigation experience for websites.

    Bootstrap provides built-in CSS classes to create a standard navigation bar.

    • The .navbar class is used to create a navigation bar component.
    • The .navbar-brand class represents the brand or logo of the website or application.
    • The .navbar-collapse class makes the navigation menu collapse into a dropdown or toggle button.
    • The .navbar-nav class is used to create a horizontal navigation menu with multiple navigation links or items.
    • The .nav-item class should be applied to each list item (<li>) within the navigation bar.
    • The .nav-link class is used to styled anchor tags (<a>) within a navigation component.
  • Buttons Demo

    Bootstrap provides some options to style buttons. Use utilities to design unique buttons for any application, which are summarized in the following table −

    Sr.No.Class & Description
    1btnDefault/ Standard button.
    2btn-primaryProvides extra visual weight and identifies the primary action in a set of buttons.
    3btn-successIndicates a successful or positive action.
    4btn-infoContextual button for informational alert messages.
    5btn-warningIndicates caution should be taken with this action.
    6btn-dangerIndicates a dangerous or potentially negative action.
    7btn-linkDeemphasize a button by making it look like a link while maintaining button behavior.

  • Grid Demo

    What is a Grid?

    In graphic design, a grid is a structure (usually two-dimensional) made up of a series of intersecting straight (vertical, horizontal) lines used to structure the content. It is widely used to design layout and content structure in print design. In web design, it is a very effective method to create a consistent layout rapidly and effectively using HTML and CSS.

    Working of Bootstrap Grid System

    Grid systems are used for creating page layouts through a series of rows and columns that house your content. Here’s how the Bootstrap grid system works −

    • Use rows to create horizontal groups of columns.
    • Content should be placed within the columns, and only columns may be the immediate children of rows.
    • Use the .themed-grid-col class to add some theming to the columns. This is not a default Bootstrap class.
    • Create a grid with equal columns using .row-cols-* classes.
    • Padding is used in columns to create gutters (gaps between column content). That padding is offset in rows using a negative margin on .rows for the first and last column.
    ExampleDescriptionDownload link
    GridsThis example indicates about grid structure in Bootstrap.Download
  • Visibility

    This chapter discusses about the visibilty utilities provided by Bootstrap. These utiltiy classes control the visibility of elements, without altering the display of the element.

    Following are the visibility classes provided by Bootstrap:

    • .visible – It is the default setting. The visible class shows data or visible data on the web page.
    • .invisible – It is used to hide or disappear the content of the application.

    The .invisible class will hide the elements both visually and for the assistive technology or screen reader users.

    Let us see an example for the utility classes .visible and .invisible:https://www.tutorialspoint.com/bootstrap/examples/visibility_utility.php

    Example

    You can edit and try running this code using the Edit & Run option.

    <!DOCTYPE html><html><head><title>Bootstrap - Visibility</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script></head><body><div class="container mt-2"><h4 class="display-5 text-success">
    
          Visibility utility classes
      &lt;/h4&gt;&lt;/div&gt;&lt;div class="container mx-5 p-3"&gt;&lt;strong&gt;The utility classes that controls the visibility of the content on the webpage.&lt;/strong&gt;&lt;p class="visible text-bg-primary"&gt;
         The text on the webpage is visible due to the use of visibility class ".visible".
      &lt;/p&gt;&lt;p class="invisible"&gt;
        The text on the webpage is not visible due to the use of visibility class ".invisible".
      &lt;/p&gt;&lt;p class="text-bg-warning"&gt;This is the text that is without a visibility class usage.&lt;/p&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;</pre>

  • Vertical align

    This chapter discusses about the vertical alignment utilities provided by Bootstrap.

    • You can change the vertical alignment of inline, inline-block, inline-table, and table cell elements.
    • Choose from following classes as per your need:
      • .align-baseline
      • .align-top
      • .align-middle
      • .align-bottom
      • .align-text-bottom
      • .align-text-top
    • In order to align the non-inline content, use flex box utilities

    Let us see an example to align the inline elements:https://www.tutorialspoint.com/bootstrap/examples/vertical_align_inline.php

    Example

    You can edit and try running this code using the Edit & Run option.

    <!DOCTYPE html><html><head><title>Bootstrap - Vertical align</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script></head><body><div class="container mt-3"><h4 class="display-5">Vertical align</h4><p>Change the alignment of elements with the align classes (only works on inline, inline-block, inline-table and table cell elements):</p><br><br><button class="btn align-baseline text-bg-success">align baseline</button><button class="btn align-top text-bg-success">align top</button><button class="btn align-middle text-bg-success">align middle</button><button class="btn align-bottom text-bg-success">align bottom</button><button class="btn align-text-top text-bg-success">align text top</button><button class="btn align-text-bottom text-bg-success">align text bottom </button></div></body></html>

    Let us see an example to align the table cell elements:https://www.tutorialspoint.com/bootstrap/examples/vertical_align_table.php

    Example

    You can edit and try running this code using the Edit & Run option.

    <!DOCTYPE html><html><head><title>Bootstrap - Vertical align</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script></head><body><div class="container mt-3"><h4 class="display-5">Vertical Align - Table cell elements</h4><p>Change the alignment of elements with the align classes (only works on inline, inline-block, inline-table and table cell elements):</p><br><br><table class="table-bordered bg-light" style="height: 100px;"><tbody><tr><td class="p-2 align-baseline">align baseline</td><td class="p-2 align-top">align top</td><td class="p-2 align-middle">align middle</td><td class="p-2 align-bottom">align bottom</td><td class="p-2 align-text-top">align-text-top</td><td class="p-2 align-text-bottom">align-text-bottom</td></tr></tbody></table></div></body></html>

  • Text

    This chapter will discuss about common Bootstrap text utilities. You can customize text alignment, weight, line height, wrapping, font size, and other formatting options using Bootstrap utility classes.

    Text alignment

    Text alignment classes provide convenient ways to align text to different components. These classes include responsive options that align the text to the start, end, or center positions, using the same viewport width breakpoints as the grid system.

    Note: Kindly resize the browser to see the alignment of text relative to the specific viewport.https://www.tutorialspoint.com/bootstrap/examples/text_alignment.php

    Example

    You can edit and try running this code using Edit & Run option.

    <!DOCTYPE html><html lang="en"><head><title>Bootstrap - Text</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script></head><body><p class="text-start text-info">Text aligned at starting position across all viewports sizes.</p><p class="text-center text-danger">Text aligned at center position across all viewports sizes.</p><p class="text-end text-warning">Text aligned at end position across all viewports sizes.</p><p class="text-sm-start text-primary">Text aligned at start on viewports sized SM (small) or wider.</p><p class="text-md-start text-primary">Text aligned at start on viewports sized MD (medium) or wider.</p><p class="text-lg-start text-primary">Text aligned at start on viewports sized LG (large) or wider.</p><p class="text-xl-start text-primary">Text aligned at start on viewports sized XL (extra-large) or wider.</p></body></html>

    Bootstrap does not provide utility classes for justified text, which means that while justified text may appear more visually appealing, it can make word spacing more random and consequently more difficult to read.

    Text wrapping and overflow

    To achieve text wrapping, apply the .text-wrap class to the text.https://www.tutorialspoint.com/bootstrap/examples/text_wrapping.php

    Example

    You can edit and try running this code using Edit & Run option.

    <!DOCTYPE html><html lang="en"><head><title>Bootstrap - Text</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script></head><body><div class="badge bg-warning text-wrap" style="width: 8rem;">
    
        This sentence should be wrapped.
      &lt;/div&gt;&lt;/body&gt;&lt;/html&gt;</pre>

    You can stop text from wrapping by using the .text-nowrap class.https://www.tutorialspoint.com/bootstrap/examples/text_overflow.php

    Example

    You can edit and try running this code using Edit & Run option.

    <!DOCTYPE html><html lang="en"><head><title>Bootstrap - Text</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script></head><body><div class="text-nowrap bg-body-secondary border" style="width: 8rem;">
    
        This sentence should overflow the parent.
      &lt;/div&gt;&lt;/body&gt;&lt;/html&gt;</pre>

    Word break

    • To avoid breaking your components layout with long strings of text, use .text-break to apply word-wrap: break-word and word-break: break-word.
    • To enhance browser compatibility, use word-wrap instead of overflow-wrap. Additionally, include the deprecated word-break: break-word to prevent problems with flex containers.

    Example

    You can edit and try running this code using Edit & Run option.

    <!DOCTYPE html><html lang="en"><head><title>Bootstrap - Text</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script></head><body><p class="text-break text-primary">TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT</p></body></html>

    Word breaking is not possible in Arabic, this is the most commonly used RTL language. The .text-break feature has been eliminated from our RTL compiled CSS

    Text transform

    Text capitalization classes can be used to convert text case in components.https://www.tutorialspoint.com/bootstrap/examples/text_transform.php

    Example

    You can edit and try running this code using Edit & Run option.

    <!DOCTYPE html><html lang="en"><head><title>Bootstrap - Text</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script></head><body><p class="text-lowercase text-danger">This is a lower case text.</p><p class="text-uppercase text-info"> This is a upper case text.</p><p class="text-capitalize text-warning">This is a capitalized text.</p></body></html>

    Note how does the .text-capitalize class modifies the initial letter of every word, without changing the case of other letters.

    Font size

    • You can easily modify the font-size of text. Unlike heading classes (such as .h1.h6) that include font-weight and line-height, these utilities focus only on font-size.
    • The size of these utilities matches HTML's heading elements, with a decrease in size as the number increases.

    Example

    You can edit and try running this code using Edit & Run option.

    <!DOCTYPE html><html lang="en"><head><title>Bootstrap - Text</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script></head><body><p class="fs-1 text-info">This is a text of .fs-1 font size.</p><p class="fs-2 text-info">This is a text of .fs-2 font size.</p><p class="fs-3 text-info">This is a text of .fs-3 font size.</p><p class="fs-4 text-info">This is a text of .fs-4 font size.</p><p class="fs-5 text-info">This is a text of .fs-5 font size.</p><p class="fs-6 text-info">This is a text of .fs-6 font size.</p></body></html>

    Modify the $font-sizes Sass map to customize the available font sizes.

    Font weight and italics

    Use the below utilities to change font-weight or font-style of text:

    1. font-weight utilities are abbreviated as .fw-*
    2. font-style utilities are abbreviated as .fst-*

    Example

    You can edit and try running this code using Edit & Run option.

    <!DOCTYPE html><html lang="en"><head><title>Bootstrap - Text</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script></head><body><p class="fw-bold text-primary">This is a bold text.</p><p class="fw-bolder text-primary">This is a bolder weight text (relative to the parent element).</p><p class="fw-semibold text-primary">This is a semibold weight text.</p><p class="fw-medium text-secodary">This is a medium weight text.</p><p class="fw-normal text-secodary">This is a normal weight text.</p><p class="fw-light text-secodary">This is a light weight text.</p><p class="fw-lighter text-danger">This is a lighter weight text (relative to the parent element).</p><p class="fst-italic text-danger">This is a italic text.</p><p class="fst-normal text-danger">This is a text with normal font style.</p></body></html>

    Line height

    To change the height of the line, use .lh-* utility classes.https://www.tutorialspoint.com/bootstrap/examples/text_line_height.php

    Example

    You can edit and try running this code using Edit & Run option.

    <!DOCTYPE html><html lang="en"><head><title>Bootstrap - Text</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script></head><body><p class="lh-1 text-primary">This is a long text that demonstrates how the utilities affect the line height of an element. Classes can be added to the element directly or occasionally to its parent element. With the help of utility API, these classes can be modified as required.</p><p class="lh-sm text-secondary">This is a long text that demonstrates how the utilities affect the line height of an element. Classes can be added to the element directly or occasionally to its parent element. With the help of utility API, these classes can be modified as required.</p><p class="lh-base text-warning">This is a long text that demonstrates how the utilities affect the line height of an element. Classes can be added to the element directly or occasionally to its parent element. With the help of utility API, these classes can be modified as required.</p><p class="lh-lg text-info">This is a long text that demonstrates how the utilities affect the line height of an element. Classes can be added to the element directly or occasionally to its parent element. With the help of utility API, these classes can be modified as required.</p></body></html>

    Monospace

    Convert the selected text to a monospace font stack using the .font-monospace class.https://www.tutorialspoint.com/bootstrap/examples/text_monospace.php

    Example

    You can edit and try running this code using Edit & Run option.

    <!DOCTYPE html><html lang="en"><head><title>Bootstrap - Text</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script></head><body><p class="font-monospace text-primary">Text in monospace font.</p></body></html>

    Reset color

    Use the .text-reset class to restore the color of a text or link and allow it to inherit the color from its parent.https://www.tutorialspoint.com/bootstrap/examples/text_reset_color.php

    Example

    You can edit and try running this code using Edit & Run option.

    <!DOCTYPE html><html lang="en"><head><title>Bootstrap - Text</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script></head><body><p class="text-body-danger">
    
        There is a &lt;a href="#" class="text-reset"&gt;reset link&lt;/a&gt; in this muted text.
      &lt;/p&gt;&lt;p class="text-body-secondary"&gt;
        There is a &lt;a href="#"&gt;reset link without text-reset class&lt;/a&gt; in this muted text.
      &lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</pre>

    Text decoration

    Use text decoration classes to enhance the appearance of the text in components.https://www.tutorialspoint.com/bootstrap/examples/text_decoration.php

    Example

    You can edit and try running this code using Edit & Run option.

    <!DOCTYPE html><html lang="en"><head><title>Bootstrap - Text</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script></head><body><p class="text-decoration-underline text-danger">There is a line underneath in this paragraph.</p><p class="text-decoration-line-through text-danger">A line runs through this text.</p><a href="#" class="text-decoration-none">There is no text decoration on this link.</a></body></html>

  • Spacing

    This chapter discusses about the utility classes provided by Bootstrap for spacing.

    Bootstrap provides predefined range of responsive margin, padding and gap utility classes that can be used to modify the appearance of an element. These utility classes work for all types of breakpoints, such as:

    breakpointsize
    xs
    sm>=576px
    md>=768px
    lg>=992px
    xl>=1200px
    xxl>=1400px

    The naming format of these classes is as follows:

    breakpointnaming format
    xs{property}{sides}-{size}
    sm, md, lg, xl, xxl{property}{sides}-{breakpoint}-{size}

    where property can be one of the following:

    propertyvalue
    mmargin
    ppadding

    where sides can be one of the following:

    sidevalue
    tmargin-top/padding-top
    bmargin-bottom/padding-bottom
    smargin-left/padding-left
    emargin-right/padding-right
    xmargin-left and margin-right or padding-left and padding-right
    ymargin-top and margin-bottom or padding-top and padding-bottom
    blankmargin and padding on all four sides

    where size can be one of the following:

    sizevalue
    0margin/padding – 0
    1margin/padding – 0.25rem
    2margin/padding – 0.5rem
    3margin/padding – 1rem
    4margin/padding – 1.5rem
    5margin/padding – 3rem
    automargin – auto

    Note: More sizes can be added by adding entries to the $spacers Sass map variable.

    Let us see an example for margin utilities:https://www.tutorialspoint.com/bootstrap/examples/spacing_margin_utilities.php

    Example

    You can edit and try running this code using the Edit & Run option.

    <!DOCTYPE html><html><head><title>Bootstrap - Spacing</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script></head><body><div class="container mt-3"><h4 class="display-4">Spacing margin utilities</h4><p><u>Set the spacing (margin) of an element with the {property}{sides}-{breakpoint}-{size} classes.</u></p><div class="mt-4 bg-info">Only top margin (1.5rem)</div><div class="mb-5 bg-light">Only bottom margin (1rem)</div><div class="ms-5 bg-warning">Only left margin (3rem)</div><div class="me-5 bg-warning">Only right margin (3rem)</div><div class="mx-5 text-bg-secondary">Both left and right margins (3rem)</div><div class="my-5 bg-primary">Both top and bottom margins (3rem)</div></div></body></html>

    Let us see an example for padding utilities:https://www.tutorialspoint.com/bootstrap/examples/spacing_padding_utilities.php

    Example

    You can edit and try running this code using the Edit & Run option.

    <!DOCTYPE html><html><head><title>Bootstrap - Spacing</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script></head><body><div class="container mt-3"><h4 class="display-4">Spacing padding utilities</h4><p><u>Set the spacing (padding) of an element with the {property){sides}-{breakpoint}-{size} classes.</u></p><div class="pt-4 bg-info">Only top padding (1.5rem)</div><div class="pb-5 text-bg-success">Only bottom padding (1rem)</div><div class="ps-5 bg-warning">Only left padding (3rem)</div><div class="pe-5 text-bg-danger">Only right padding (3rem)</div><div class="px-5 text-bg-secondary">Both left and right padding (3rem)</div><div class="py-5 text-bg-primary">Both top and bottom padding (3rem)</div></div></body></html>

    Horizontal centering

    For horizontal centering fixed-width block level content, Bootstrap provides .mx-auto class.

    Let us see an example:https://www.tutorialspoint.com/bootstrap/examples/spacing_horizontal_centering.php

    Example

    You can edit and try running this code using the Edit & Run option.

    <!DOCTYPE html><html><head><title>Bootstrap - Spacing</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script></head><body><div class="container mt-3"><h4 class="display-5">Horizontal centering</h4><br><div class="mx-auto p-2 text-bg-success" style="width: 200px;">
    
          Horizontally centered
        &lt;/div&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;</pre>
    • By default, negative values can be used with margin properties in CSS.
    • The negative values cannot be used with padding.
    • It is possible to enable the negative margins by setting the variable $enable-negative-margins to true.

    Gap utilities

    You can make use of gap utilities on the parent element, while using display: grid or display: flex. By default the gap utilities are responsive.

    It can hold the values for all the six sizes from the $spacers map (0-5). There is no .gap-auto class, as it is same as .gap-0.

    Let us see an example:https://www.tutorialspoint.com/bootstrap/examples/spacing_gap_utility.php

    Example

    You can edit and try running this code using the Edit & Run option.

    <!DOCTYPE html><html><head><title>Bootstrap - Spacing</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script></head><body><div class="container mt-3"><h4 class="display-6">
    
          gap utility
      &lt;/h4&gt;&lt;h4&gt;gap utility class &lt;i&gt;.gap-*&lt;/i&gt;&lt;/h4&gt;&lt;div class="d-grid gap-0 p-3 border border-primary bg-light"&gt;&lt;div class="p-2 bg-light border"&gt;
              gap-0
          &lt;/div&gt;&lt;div class="p-2 bg-light border"&gt;
              gap-0
          &lt;/div&gt;&lt;/div&gt;&lt;div class="d-grid gap-1 p-3 border border-danger bg-primary-subtle"&gt;&lt;div class="p-2 bg-light border"&gt;
            gap-1
          &lt;/div&gt;&lt;div class="p-2 bg-light border"&gt;
            gap-1
          &lt;/div&gt;&lt;/div&gt;&lt;div class="d-grid gap-2 p-3 border border-success bg-danger-subtle"&gt;&lt;div class="p-2 bg-light border"&gt;
            gap-2
          &lt;/div&gt;&lt;div class="p-2 bg-light border"&gt;
            gap-2
          &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;</pre>

    row-gap

    In order to set the vertical space between children items in a specified container, use the utility class .row-gap.

    Let us see an example:https://www.tutorialspoint.com/bootstrap/examples/spacing_row_gap.php

    Example

    You can edit and try running this code using the Edit & Run option.

    <!DOCTYPE html><html><head><title>Bootstrap - Spacing</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script></head><body><div class="container mt-3"><h4 class="display-6">
    
         gap utility
        &lt;/h4&gt;&lt;h4&gt;row gap utility class &lt;i&gt;.row-gap-*&lt;/i&gt;&lt;/h4&gt;&lt;div class="d-grid gap-0 row-gap-4"&gt;&lt;div class="p-2 border bg-primary"&gt;
            row gap-4
          &lt;/div&gt;&lt;div class="p-2 border bg-info"&gt;
            row gap-4
          &lt;/div&gt;&lt;div class="p-2 border bg-warning"&gt;
            row gap-4
          &lt;/div&gt;&lt;div class="p-2 border bg-danger-subtle"&gt;
            row gap-4
          &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;</pre>

    column-gap

    In order to set the horizontal space between children items in a specified container, use the utility class .column-gap.

    Let us see an example.

    Example

    You can edit and try running this code using the Edit & Run option.

    <!DOCTYPE html><html><head><title>Bootstrap - Spacing</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script></head><body><div class="container mt-3"><h4 class="display-4">
    
        gap utility
      &lt;/h4&gt;&lt;h4&gt;column gap utility class &lt;i&gt;.column-gap-*&lt;/i&gt;&lt;/h4&gt;&lt;div class="d-flex gap-0 column-gap-4"&gt;&lt;div class="p-2 g-col-6 border border-primary"&gt;Grid item 1&lt;/div&gt;&lt;div class="p-2 g-col-6 border border-primary"&gt;Grid item 2&lt;/div&gt;&lt;div class="p-2 g-col-6 border border-primary"&gt;Grid item 3&lt;/div&gt;&lt;div class="p-2 g-col-6 border border-primary"&gt;Grid item 4&lt;/div&gt;&lt;/div&gt;&lt;div class="d-flex gap-0 column-gap-2"&gt;&lt;div class="p-2 g-col-6 border border-success"&gt;Grid item 1&lt;/div&gt;&lt;div class="p-2 g-col-6 border border-success"&gt;Grid item 2&lt;/div&gt;&lt;div class="p-2 g-col-6 border border-success"&gt;Grid item 3&lt;/div&gt;&lt;div class="p-2 g-col-6 border border-success"&gt;Grid item 4&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;</pre>

  • Sizing

    This chapter discusses about Bootstrap sizing. Sizing allows you to adjust the height and width of an element through the utility classes.

    Relative to the parent

    The width and height utilities are created using the utility API found in _utilities.scss. They come with default support for values like 25%50%75%100%, and auto. You can customize these values to generate different utilities.

    Relative to the width

    The w-25w-50w-75w-100, and w-auto classes define the width of each div element.https://www.tutorialspoint.com/bootstrap/examples/sizing_relative_to_the_width.php

    Example

    You can edit and try running this code using Edit & Run option.

    <!DOCTYPE html><html lang="en"><head><title>Bootstrap - Sizing</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script></head><body><div class="w-25 p-3 text-bg-primary">25% width</div><div class="w-50 p-3 text-bg-secondary">50% width</div><div class="w-75 p-3 text-bg-warning">75% width</div><div class="w-100 p-3 text-bg-info">Full width (100%)</div><div class="w-auto p-3 text-bg-danger">Auto width</div></body></html>

    Relative to the height

    The classes h-25h-50h-75h-100, and h-auto are responsible for setting the height of each div element.https://www.tutorialspoint.com/bootstrap/examples/sizing_relative_to_the_height.php

    Example

    You can edit and try running this code using Edit & Run option.

    <!DOCTYPE html><html lang="en"><head><title>Bootstrap - Sizing</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script></head><body><div class="text-bg-light" style="height: 100px;"><div class="h-25 d-inline-block text-bg-primary text-center" style="width: 150px;">25% Height</div><div class="h-50 d-inline-block text-bg-secondary text-center" style="width: 150px;">50% Height</div><div class="h-75 d-inline-block bg-warning text-center" style="width: 150px;">75% Height</div><div class="h-100 d-inline-block text-bg-info text-center" style="width: 150px;">100% Height </div><div class="h-auto d-inline-block text-bg-danger text-center" style="width: 150px;">Auto Height</div></div></body></html>

    Use class mw-100 to set the max-width: 100%. In the following example, we demonstrate the use of this class:https://www.tutorialspoint.com/bootstrap/examples/sizing_relative_maximum_width.php

    Example

    You can edit and try running this code using Edit & Run option.

    <!DOCTYPE html><html lang="en"><head><title>Bootstrap - Sizing</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script></head><body><div class="text-bg-light" style="width: 50%; height: 100px;"><div class="mw-100 text-bg-warning text-center" style="width: 200%;">Maximum width 100%</div></div></body></html>

    Use class mh-100 to set the max-height: 100%. In the following example, we demonstrate the use of this class:https://www.tutorialspoint.com/bootstrap/examples/sizing_relative_maximum_height.php

    Example

    You can edit and try running this code using Edit & Run option.

    <!DOCTYPE html><html lang="en"><head><title>Bootstrap - Sizing</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script></head><body><div class="text-bg-light" style="height: 100px;"><div class="mh-100 text-bg-warning" style="width: 100px; height: 200px;">Maximum height 100%</div></div></body></html>

    Relative to the viewport

    It is possible to modify the width and height of elements relative to the viewport.

    • min-vw-100 – sets a minimum width of 100 viewport width.
    • min-vh-100 – sets a minimum height of 100 viewport height.
    • vw-100 – sets the width of the element to be exactly 100 viewport width.
    • vh-100 – sets the height of the element to be exactly 100 viewport height.

    Example

    You can edit and try running this code using Edit & Run option.

    <!DOCTYPE html><html lang="en"><head><title>Bootstrap - Sizing</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script></head><body><div  class="container text-bg-light" ><div class="min-vw-100 text-bg-primary p-3  my-2 d-inline-block">Minimum width (min-vw-100)</div><div class="vw-100 text-bg-warning p-3 my-2 d-inline-block">Width (vw-100)</div><div class="min-vh-100 text-bg-secondary p-3 mx-2 d-inline-block ">Minium height (min-vh-100)</div><div class="vh-100 text-bg-danger p-3 mx-2 d-inline-block">Height (vh-100)</div></div></body></html>

  • Shadows

    This chapter discusses about the box-shadow utilities. Bootstrap provides a set of CSS classes that allows you to apply different types of box shadows to elements.

    The predefined classes available are as follows:

    ClassDescription
    .shadow-noneNo shadow effect.
    .shadow-smAdds a small and subtle shadow effect.
    .shadowApplies a medium strength shadow effect.
    .shadow-lgApplies a large and prominent shadow effect.

    Let us see an example:https://www.tutorialspoint.com/bootstrap/examples/shadows_add.php

    Example

    You can edit and try running this code using the Edit & Run option.

    <!DOCTYPE html><html><head><title>Bootstrap - Shadows</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script></head><body><div class="container mt-3"><h4>Shadow effect</h4><div><button class="btn shadow-none">Button with no shadow</button></div><div><button class="btn shadow">Button with a subtle shadow</button></div><div><button class="btn shadow-sm">Button with a regular shadow</button></div><div><button class="btn shadow-lg">Button with a larger shadow</button></div></div></body></html>

  • Position

    This chapter discusses about the .position utility classes for quick configuration of the position of an element.

    Position values

    The .position classes are available for quick positioning, but they are not responsive in nature.

    The various values for position class are as follows:

    • .position-static
    • .position-relative
    • .position-absolute
    • .position-fixed
    • .position-sticky

    Let us see an example:https://www.tutorialspoint.com/bootstrap/examples/position_values.php

    Example

    You can edit and try running this code using the Edit & Run option.

    <!DOCTYPE html><html lang="en"><head><title>Bootstrap - Position</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script></head><body class="m-2"><h4 class="mb-4">Position values</h4><div class="container mt-4 bg-light border border-dark">
    
    	  Position: static states that the top, right,
    	  bottom, and left properties will be the same no matter
    	  &lt;p class="position-static bg-info top-50 start-50 text-light"&gt;position: static&lt;/p&gt;
    	  This part is out of the paragraph.
    </div><div class="container mt-4 bg-light border border-dark">
    	  Position: relative sets its position to be relative
    	  with respect to the elements on top of it
    	  &lt;p class="position-relative bg-success top-50	start-50 text-light w-50"&gt;
    position: relative;
    	  &lt;/p&gt;
    	  This means that the top, right, bottom, and
    	  left properties will
    	  affect the position of the Paragraph.
    </div><div class="container mt-4 bg-light border border-dark">
    	  Position: absolute sets its position relative to
    	  the closest parent and it set its position absolute
    	  with that.
    	  &lt;p class="position-absolute bg-warning bottom-0 end-50 text-light"&gt;
    position: absolute;
    	  &lt;/p&gt;
    	  This means that the top, right, bottom, and left
    	  properties will get adjusted with respect to the
    	  nearest ancestor and then the position is set.
    </div></body></html>

    Arrange elements

    Elements can be arranged easily with the edge positioning utility classes.

    The format for arranging the elements is {property}-{position}.

    where property can hold following values:

    propertydescription
    topvertical top position
    starthorizontal left position (LTR)
    bottomvertical bottom position
    endhorizontal right position (LTR)

    where position can hold following values:

    positiondescription
    00 edge position
    5050% edge position
    100100% edge position

    Note: More position values can be added by making entries to the $position-values Sass map variable.

    Let us see an example of arrangement of elements using the .position-* class:https://www.tutorialspoint.com/bootstrap/examples/position_arrange_elements.php

    Example

    You can edit and try running this code using the Edit & Run option.

    <!DOCTYPE html><html lang="en"><head><title>Bootstrap - Position</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script></head><body class="container p-3 m-5"><div class="position-absolute top-0 start-0 mb-2"><button type="button" class="btn btn-primary">top-0 start-0</button></div><div class="position-absolute top-50 start-50 mb-2"><button type="button" class="btn btn-secondary">top-50 start-50</button></div><div class="position-absolute top-0 end-0 mb-2"><button type="button" class="btn btn-success">top-0 end-0</button></div><div class="position-absolute bottom-0 start-0 mb-2"><button type="button" class="btn btn-warning">bottom-0 start-0</button></div><div class="position-absolute bottom-50 end-50 mb-2"><button type="button" class="btn btn-danger">bottom-50 end-50</button></div><div class="position-absolute bottom-0 end-0 mb-2"><button type="button" class="btn btn-info">bottom-0 end-0</button></div></div></body></html>

    Center elements

    • Using the transform utility class .translate-middle, you can arrange the elements in the center.
    • The transform class applies the transformations translateX(-50%) and translateY(-50%) to an element.
    • This element then combines with edge positioning utilities and thus centers the element.

    Let us see an example:https://www.tutorialspoint.com/bootstrap/examples/position_center_elements.php

    Example

    You can edit and try running this code using the Edit & Run option.

    <!DOCTYPE html><html lang="en"><head><title>Bootstrap - Position</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script><style>
    
      span {
          border: 2px solid rgb(26, 58, 241);
          padding: 30px;
          background:#1ae3f1;
      }
    &lt;/style&gt;&lt;/head&gt;&lt;body&gt;&lt;div class="container"&gt;&lt;div class="position-absolute top-0 start-0 translate-middle"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="position-absolute top-0 start-50 translate-middle"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="position-absolute top-0 start-100 translate-middle"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="position-absolute top-50 start-0 translate-middle"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="position-absolute top-50 start-50 translate-middle"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="position-absolute top-50 start-100 translate-middle"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="position-absolute top-100 start-0 translate-middle"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="position-absolute top-100 start-50 translate-middle"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="position-absolute top-100 start-100 translate-middle"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;</pre>

    Use .translate-middle-x or .translate-middle-y classes, in order to position the elements only in horizontal or vertical direction.

    Let us see an example:https://www.tutorialspoint.com/bootstrap/examples/position_translate.php

    Example

    You can edit and try running this code using the Edit & Run option.

    <!DOCTYPE html><html lang="en"><head><title>Bootstrap - Position</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script><style>
    
      span {
          border: 2px solid rgb(26, 58, 241);
          padding: 30px;
          background:#dd1c8c;
      }
    &lt;/style&gt;&lt;/head&gt;&lt;body&gt;&lt;div class="position-static"&gt;&lt;div class="position-absolute top-0 start-0"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="position-absolute top-0 start-50 translate-middle-x"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="position-absolute top-0 end-0"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="position-absolute top-50 start-0 translate-middle-y"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="position-absolute top-50 start-50 translate-middle"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="position-absolute top-50 end-0 translate-middle-y"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="position-absolute bottom-0 start-0"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="position-absolute bottom-0 start-50 translate-middle-x"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="position-absolute bottom-0 end-0"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;</pre>

    Few more examples

    Some more examples are shown below, where .position class is used along with other utility classes provided by Bootstrap:https://www.tutorialspoint.com/bootstrap/examples/position_example.php

    Example

    You can edit and try running this code using the Edit & Run option.

    <!DOCTYPE html><html lang="en"><head><title>Bootstrap - Position</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script></head><body><div class="d-flex p-5 gap-5"><button type="button" class="btn btn-success position-relative">
    
      Notifications&lt;span class="position-absolute top-0 start-100 translate-middle p-2 bg-danger border border-light rounded-circle"&gt;&lt;span class="visually-hidden"&gt;unread messages&lt;/span&gt;&lt;/span&gt;&lt;/button&gt;&lt;button type="button" class="btn btn-primary position-relative"&gt;
      Inbox
      &lt;span class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-danger"&gt;
        99+
        &lt;span class="visually-hidden"&gt;unread messages&lt;/span&gt;&lt;/span&gt;&lt;/button&gt;&lt;button type="button" class="btn btn-warning position-relative"&gt;
      Messages &lt;span class="position-absolute top-0 start-100 translate-middle badge border border-light rounded-circle bg-danger p-2"&gt;&lt;span class="visually-hidden"&gt;unread messages&lt;/span&gt;&lt;/span&gt;&lt;/button&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;</pre>

    These classes can be used along with other Bootstrap components to create new ones.

    Let us see an example where progress-bar is used with .position utility class:https://www.tutorialspoint.com/bootstrap/examples/position_example_1.php

    Example

    You can edit and try running this code using the Edit & Run option.

    <!DOCTYPE html><html lang="en"><head><title>Bootstrap - Position</title><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"><script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script></head><body class="mb-5 p-3"><h2 class="text-center">Position</h2><div><div class="position-relative m-4"><div class="progress" ><div class="progress-bar" role="progressbar"></div></div><button type="button" class="position-absolute top-0 start-0 translate-middle btn btn-sm btn-success rounded-pill">1</button><button type="button" class="position-absolute top-0 start-50 translate-middle btn btn-sm btn-warning rounded-pill">2</button><button type="button" class="position-absolute top-0 start-100 translate-middle btn btn-sm btn-info rounded-pill">3</button><button type="button" class="position-absolute top-50 end-50 translate-middle btn btn-sm btn-danger rounded-pill">4</button></div></div></body></html>

    Print Page