Bootstrap 5 Vertical Alignment Last Updated : 04 Apr, 2024 Comments Improve Suggest changes Like Article Like Report Bootstrap 5 Vertical Alignment facilitates aligning inline, inline-block, inline-table, and table cell elements vertically within their container. It offers classes for top, bottom, middle alignment, and stretching content to fill vertical space, enhancing layout flexibility in web development. Bootstrap 5 Vertical Alignment Classes: Class NameDescriptionalign-baselineAligns the baseline of the element with the baseline of its parent.align-topAligns the top of the element with the top of the line.align-middleAligns the middle of the element with the middle of the parent.align-bottomAligns the bottom of the element with the bottom of the line.align-text-bottomAligns the bottom of the element with the bottom of the parent element's text.align-text-topAligns the top of the element with the top of the parent element's text.Syntax: <span class="align-top">....</span>Examples of Bootstrap 5 Vertical AlignmentExample 1: This example shows the use of vertical alignment classes to align span elements inside a paragraph. HTML <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Bootstrap 5 - JavaScript CDN --> <script src= "https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.min.js"> </script> <!-- Bootstrap 5 - CSS CDN--> <link href= "https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css" rel="stylesheet" /> </head> <body> <div class="container text-center"> <div class="my-4"> <h4>Bootstrap 5 Vertical Alignment</h4> </div> <p> <span class="align-top bg-info"> GeeksforGeeks </span> <span class="align-baseline bg-warning"> is a </span> <span class="align-middle bg-secondary"> Computer </span> <span class="align-bottom bg-primary"> Science </span> <span class="align-text-top bg-danger"> Portal </span> <span class="align-text-bottom bg-success"> for Geeks. </span> </p> </div> </body> </html> Output: Bootstrap 5 Vertical Alignment Example Output Example 2: In this example, we show the use of the align-baseline, align-top, align-middle, and align-bottom classes using images. HTML <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- Bootstrap 5 - JavaScript CDN --> <script src= "https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.min.js"> </script> <!-- Bootstrap 5 - CSS CDN--> <link href= "https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css" rel="stylesheet" /> </head> <body> <div class="container text-center"> <div class="my-4"> <h5>Bootstrap 5 Vertical Alignment Using with Table Cells</h5> </div> <table class="table w-50 m-auto"> <thead> <tr> <th class="align-top">Align Top</th> <th class="align-baseline">Align Baseline</th> <th class="align-middle">Align Middle</th> <th class="align-baseline">Align Bottom</th> </tr> </thead> <tbody> <tr style="height: 80px;"> <td class="align-top">Top</td> <td class="align-baseline">Baseline</td> <td class="align-middle">Middle</td> <td class="align-bottom">Bottom</td> </tr> </tbody> </table> </div> </body> </html> Output: Bootstrap 5 Vertical Alignment Using table Cell Example Output Comment More infoAdvertise with us Next Article Bootstrap 5 Vertical Alignment vpsop Follow Improve Article Tags : Technical Scripter Web Technologies Bootstrap Technical Scripter 2022 Bootstrap-5 +1 More Similar Reads Bootstrap 5 Table Vertical alignment What is Bootstrap Tables?Bootstrap Tables are this is useful to make tables and charts and it has a lot of customizable options and utilities thanks to the Bootstrap predefined styles. Bootstrap provides us with functionality that helps us to vertically align these table cells' contents. By default, 3 min read Bootstrap 5 Columns Vertical Alignment Bootstrap 5 Columns Vertical alignment is used to change the alignment of the column's content in the vertical direction. Bootstrap5 Columns Vertical alignment classes: align-items-start: This class is used to align the column items to the start position. align-items-center: This class is used to al 2 min read Bootstrap 5 Text Alignment Bootstrap 5 text alignment classes are used to realign components with the start, end, and center variation. It can be used in the same viewport width breakpoints as the grid system. iframe { width: 100%; height: 450px;} @media (max-width: 1145px) {.article--viewer .a-wrapper .content .text iframe { 2 min read Bootstrap 5 Columns Alignment In bootstrap 5, we can use flexbox alignment utilities to align our columns horizontally and vertically without using CSS. The following are the possible alignment ways: Vertical alignment: For aligning the column vertically we use the flexbox utilities to get desired alignment system.Horizontal ali 2 min read Bootstrap 5 Spinners Alignment Bootstrap 5 Spinners Alignment is used to set the alignment of the spinner element. The spinner element can easily be resized, recolored, and quickly aligned. Spinners Alignment: Margin Alignment: Spinner margin is used to create spinners in different margins.Spinners Placement: Spinners Placement i 2 min read How to set vertical alignment in Bootstrap ? Setting vertical alignment in Bootstrap refers to the process of positioning elements along the vertical axis within a layout or container. This ensures consistent and visually appealing alignment of content, such as text, images, or buttons, relative to each other or to the container's boundaries. 2 min read Vertical alignment in Bootstrap with Examples Vertical Alignment in bootstrap changes the alignment of elements vertically with the help vertical-alignment utilities. The vertical-align utilities only affects inline(Present in one Line), inline-block(Present as blocks in one line), inline-table, and table cell(Elements in a cell of a table) ele 2 min read ReactJS MDBootstrap Vertical Alignment Layout MDBootstrap is a Material Design and bootstrap-based react UI library that is used to make good-looking webpages with its seamless and easy-to-use component. In this article, we will know how to use Vertical Alignment Layout in ReactJS MDBootstrap. Vertical Alignment Layout is used to align the cont 2 min read Bootstrap 5 Columns Horizontal Alignment Bootstrap5 Columns Horizontal alignment is used to align the columns horizontally so that we can define how the columns will be displayed in a single line. Column Horizontal Alignment classes used: justify-content-start: This class is used to align columns from start.justify-content-center: This cla 2 min read Blaze UI Alignment Vertical Blaze UI is a free open source UI Toolkit that provides a great structure for building websites quickly with a scalable and maintainable foundation. All components in Blaze UI are developed mobile-first and rely solely on native browser features, not a separate library or framework. It helps us to c 2 min read Like