Lesson 41: Grid Medium in Bootstrap 5

In the previous Bootstrap 5 lesson, you learned how to create grids with classes for small screens. However, on medium-sized devices with better designs, the grid is often divided 50%/50%.

In the previous Bootstrap 5 lesson , you learned how to create a grid with classes for small screens. This involves two divs (columns) divided in a 25%/75% ratio:

 

. .

However, on average devices with better designs, the split is usually 50%/50%.

The average device will have a screen width ranging from 768px to 991px.

For average devices, we will use the class .col-md-*:

. .

Currently, according to Bootstrap, at small sizes, the class will be used with -sm . At medium sizes, you will use -md- .

The following example will show the results on a small device split at a ratio of 25%/75% and 50%/50% on a medium-sized device:

 Bootstrap Example 

Medium Grid

Adjust the browser window size to see the change.

 Giới thiệu về TipsMake.com.com Khởi nguồn từ một trang web cung cấp kiến thức về mạng, server, các thiết bị mạng, thủ thuật máy tính. Hiện nay, TipsMake.com.com đã trở thành mạng xã hội về khoa học công nghệ, mở rộng nội dung để đáp ứng nhu cầu của các thành viên về nhiều lĩnh vực công nghệ hơn như điện thoại, thiết bị thông minh, điện tử, bảo mật máy tính,. Chúng tôi mong muốn các thành viên của mình luôn nắm bắt được những thông tin, kiến thức, xu hướng công nghệ mới nhất, cũng như gỡ rối những vấn đề công nghệ các thành viên gặp phải khi sử dụng máy tính, điện thoại, các thiết bị điện tử thông dụng khác. Các bạn có thể trở thành một phần của TipsMake.com.com bằng cách gửi bài viết, trải nghiệm công nghệ của mình về cho đội ngũ quản lý nội dung của mạng xã hội thông qua địa chỉ email hoặc đăng ký tài khoản và đăng bài trực tiếp trên TipsMake.com.com. 

 

Use only Medium

In the example below, we only have the same class .col-md-6(no parentheses .col-sm-*). This means that medium, large, extra-large, and XXL devices will be stacked 50%/50%. However, for small and extra-small devices, they will be stacked vertically (100% width):

 Bootstrap Example 

Adjust the browser size to see the change.

 Giới thiệu về TipsMake.com.com: Khởi nguồn từ một trang web cung cấp kiến thức về mạng, server, các thiết bị mạng, thủ thuật máy tính. Hiện nay, TipsMake.com.com đã trở thành mạng xã hội về khoa học công nghệ, mở rộng nội dung để đáp ứng nhu cầu của các thành viên về nhiều lĩnh vực công nghệ hơn như điện thoại, thiết bị thông minh, điện tử, bảo mật máy tính,. Chúng tôi mong muốn các thành viên của mình luôn nắm bắt được những thông tin, kiến thức, xu hướng công nghệ mới nhất, cũng như gỡ rối những vấn đề công nghệ các thành viên gặp phải khi sử dụng máy tính, điện thoại, các thiết bị điện tử thông dụng khác. Các bạn có thể trở thành một phần của TipsMake.com.com bằng cách gửi bài viết, trải nghiệm công nghệ của mình về cho đội ngũ quản lý nội dung của mạng xã hội thông qua địa chỉ email hoặc đăng ký tài khoản và đăng bài trực tiếp trên TipsMake.com.com. 

 

Automatic layout column

In Bootstrap 5, you have an extremely easy way to create columns with the same width across all devices: just number the columns .col-md-*and use the class .col-mdon specific elements of the `col` element . Bootstrap will determine the number of columns, and they will all have the same width.

If the screen size is smaller than 768px, the columns will be stacked horizontally:

 Bootstrap Example 

Automatic responsive layout column

 1 of 2 2 of 2 
1 of 4 2 of 4 3 of 4 4 of 4

Above are the things you need to know about creating a grid medium in Bootstrap 5. Hopefully, this article is helpful to you.

Related posts
Other Program articles
  • Lesson 40: Small Grid in Bootstrap 5

    tiếp tục bài học về grid trong bootstrap 5, chúng ta sẽ tìm hiểu cách làm lưới grid nhỏ đơn giản nhất. về cơ bản, cách tạo grid nhỏ bằng bootstrap 5 không khó.
  • Lesson 39: Ultra-Small Grid Styles in Bootstrap 5

    Ở những bài học bootstrap 5 trước, chúng ta đã tìm hiểu về những kiểu hệ thống lưới grid cơ bản. Ở bài này, hãy cùng download.vn đi sâu hơn vào những kiểu grid cực nhỏ nhé!
  • Lesson 38: Grid Systems from Stacked to Horizontal in Bootstrap 5

    hệ thống grid trong bootstrap 5 khá đa dạng. Ở bài học này, chúng ta sẽ tập trung vào hai cách sắp xếp grid thông dụng nhất nhé!
  • Lesson 37: Form Validation in Bootstrap 5

    form validation hay xác thực biểu mẫu cung cấp phản hồi giá trị có người dùng. Ở bài học cách dùng bootstrap này, hãy cùng nhau tìm hiểu cách thêm validation vào form trong bootstrap 5 như thế nào nhé!
  • Lesson 36: Form Floating Label in Bootstrap 5

    floating labels là phần tử cho bạn cách tạo những nhãn biểu mẫu đơn giản, nổi lên trên các trường nhập. dưới đây là cách tạo floating label trong bootstrap 5.
  • Lesson 35: Input Groups in Bootstrap 5

    nhóm input hay input group trong bootstrap 5 mang tới cho bạn cách mở rộng một input control. dưới đây là cách dùng input group trong bootstrap 5.
Category

System

Windows XP

Windows Server 2012

Windows 8

Windows 7

Windows 10

Wifi tips

Virus Removal - Spyware

Speed ​​up the computer

Server

Security solution

Mail Server

LAN - WAN

Ghost - Install Win

Fix computer error

Configure Router Switch

Computer wallpaper

Computer security

Mac OS X

Mac OS System software

Mac OS Security

Mac OS Office application

Mac OS Email Management

Mac OS Data - File

Mac hardware

Hardware

USB - Flash Drive

Speaker headset

Printer

PC hardware

Network equipment

Laptop hardware

Computer components

Advice Computer

Game

PC game

Online game

Mobile Game

Pokemon GO

information

Technology story

Technology comments

Quiz technology

New technology

British talent technology

Attack the network

Artificial intelligence

Technology

Smart watches

Raspberry Pi

Linux

Camera

Basic knowledge

Banking services

SEO tips

Science

Strange story

Space Science

Scientific invention

Science Story

Science photo

Science and technology

Medicine

Health Care

Fun science

Environment

Discover science

Discover nature

Archeology

Life

Travel Experience

Tips

Raise up child

Make up

Life skills

Home Care

Entertainment

DIY Handmade

Cuisine

Christmas

Application

Web Email

Website - Blog

Web browser

Support Download - Upload

Software conversion

Social Network

Simulator software

Online payment

Office information

Music Software

Map and Positioning

Installation - Uninstall

Graphic design

Free - Discount

Email reader

Edit video

Edit photo

Compress and Decompress

Chat, Text, Call

Archive - Share

Electric

Water heater

Washing machine

Television

Machine tool

Fridge

Fans

Air conditioning

Program

Unix and Linux

SQL Server

SQL

Python

Programming C

PHP

NodeJS

MongoDB

jQuery

JavaScript

HTTP

HTML

Git

Database

Data structure and algorithm

CSS and CSS3

C ++

C #

AngularJS

Mobile

Wallpapers and Ringtones

Tricks application

Take and process photos

Storage - Sync

Security and Virus Removal

Personalized

Online Social Network

Map

Manage and edit Video

Data

Chat - Call - Text

Browser and Add-on

Basic setup