Home >Web Front-end >CSS Tutorial >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>
Text alignment works fine:
[Text Alignment Image]
However, when you set the column to extra small (extra small):
<div>
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!