A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mdbootstrap.com/docs/vue/layout/grid/ below:

Vue Bootstrap 5 grid system

Grid system Vue Bootstrap 5 Grid system

Bootstrap grid is a powerful system for building mobile-first layouts. It's very extensive tool with a great number of options. Below we present you the core knowledge. It's a simplified overview of the most commonly used examples.

Basic example

Bootstrap’s grid system uses a series of containers, rows, and columns to layout and align content. It’s built with flexbox and is fully responsive. Below is an example and an in-depth explanation for how the grid system comes together.

One of three columns

One of three columns

One of three columns

The above example creates three equal-width columns across all devices and viewports using our predefined grid classes. Those columns are centered in the page with the parent MDBContainer.

Taking it step by step:

Container

Bootstrap requires a containing element to wrap site contents and house our grid system. Without a container, the grid won't work properly.

Row

Rows create horizontal groups of columns. Therefore, if you want to split your layout horizontally, use MDBRow.

Columns

Bootstrap's grid system allows up to 12 columns across the page.

We use MDBCol to create a column. You can customize columns with properties, e.g. md="*" , where * specifies the number of columns between 1 and 12.

Attribute md specifies the breakpoint where the columns change its width.

Attribute md means "screen ≥768px", so in the example below the columns will stretch to 100% of the width on the screens smaller or equal 768px.

How it works

Breaking it down, here’s how the grid system comes together:

Most common examples

A few of the most common grid layout examples to get you familiar with building within the Bootstrap grid system.

Five grid tiers

There are five tiers to the Bootstrap grid system, one for each range of devices we support. Each tier starts at a minimum viewport size and automatically applies to the larger devices unless overridden.

Three equal columns

Get three equal-width columns starting at desktops and scaling to large desktops. On mobile devices, tablets and below, the columns will automatically stack.

Three unequal columns

Get three columns starting at desktops and scaling to large desktops of various widths. Remember, grid columns should add up to twelve for a single horizontal block. More than that, and columns start stacking no matter the viewport.

Two columns

Get two columns starting at desktops and scaling to large desktops.

Two columns with two nested columns

Per the documentation, nesting is easy—just put a row of columns within an existing column. This gives you two columns starting at desktops and scaling to large desktops, with another two (equal widths) within the larger column.

At mobile device sizes, tablets and down, these columns and their nested columns will stack.

Mixed: mobile and desktop

The Bootstrap v5 grid system has five tiers of classes: xs (extra small, this class infix is not used), sm (small), md (medium), lg (large), and xl (extra large). You can use nearly any combination of these classes as a component property to create more dynamic and flexible layouts.

Each tier of classes scales up, meaning if you plan on setting the same widths for md, lg and xl, you only need to specify md.

col="6" md="4"

col="6" md="4"

col="6" md="4"

Mixed: mobile, tablet, and desktop

sm="6" lg="8"

col="6" lg="4"

col="6" sm="4"

col="6" sm="4"

col="6" sm="4"

Containers

Additional properties added to MDBContainer allow containers that are 100% wide until a particular breakpoint.

(100% width below 540px)

sm (100% width below 540px)

md (100% width below 720px)

lg (100% width below 960px)

xl (100% width below 1140px)

xxl (100% width below 1320px)

fluid (always 100% width)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4