Home > Web Front-end > CSS Tutorial > Why Doesn't col-xs-* Work in Bootstrap 4?

Why Doesn't col-xs-* Work in Bootstrap 4?

Mary-Kate Olsen
Release: 2024-12-26 10:24:11
Original
859 people have browsed it

Why Doesn't col-xs-* Work in Bootstrap 4?

col-xs-* not working in Bootstrap 4

You may encounter this when trying to resize columns in Bootstrap Problem, where the col-xs-* classes don't seem to work. When you set the column to medium size:

<h1>
Copy after login

Text alignment works fine:
[Text Alignment Image]

However, when you set the column to extra small (extra small):

 <div>
Copy after login

Text alignment no longer works:
[Text alignment error image]

The reason for this not working is due to deprecation in Bootstrap 4 col-xs-* classes. You need to use the col-* classes to specify the dimensions of the columns. For example, replace col-xs-12 with col-12.

Also, please note that col-xs-offset-{n} is also replaced by offset-{n} in v4.

The above is the detailed content of Why Doesn't col-xs-* Work in Bootstrap 4?. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template