Bootstrap grid won't work using xs columns

╄→гoц情女王★ 提交于 2019-11-29 15:33:14
Zim

The pen is using Bootstrap 4, and the CSS class names have changed. The xs infix has been removed in 4.x...

col-xs-offset-3 is now offset-3
col-xs-6 is now col-6

  <div class="container-fluid">
    <div class="row">
      <div class="offset-3 col-6">
      <h1>FFC Calculator</h1> 
      </div>
    </div>
  </div>

http://codepen.io/anon/pen/JNyqWX

Edison Biba

You are using Bootstrap 4. The class names that you are using are for Bootstrap 3. So you have two options:

  • Include Bootstrap 3 in your project and remove bootstrap 4.

  • Change the class names in your code. Check this link for offsets in Bootstrap 4 and this one for grid.

This is your code for Bootstrap 4. Also take care of col-md-x, col-lg-x based on your sceen sizes.

<div class="container-fluid">
  <div class="row">
    <div class="col-md-6 offset-3">
      <h1>FFC Calculator</h1>
    </div>
  </div>
</div>

Also check your CodePen link where I have fixed it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!