.clearfix - Clears floats - HTML CSS Bootstrap Class List

HTML CSS examples for Bootstrap Class List:clearfix

Description

.clearfix - Clears floats

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<head>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.6/umd/popper.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js"></script>
</head><!--  ww  w  . j a  v  a2s .  c  o  m-->
<body>

<div class="container-fluid">
  <h1>Hello World!</h1>
  <div class="row">
    <div class="col-xs-6 col-sm-3" style="background-color:lavender;">
      Column 1<br>
      Resize the browser window to see the effect. 
      Column 1<br>
      Resize the browser window to see the effect. 
      Column 1<br>
      Resize the browser window to see the effect.       
    </div>
    <div class="col-xs-6 col-sm-3" style="background-color:blue;">Column 2</div>

    <div class="clearfix visible-xs"></div>
    <div class="col-xs-6 col-sm-3" style="background-color:lightcyan;">Column 3</div>
    <div class="col-xs-6 col-sm-3" style="background-color:lightgray;">Column 4</div>
  </div>
</div>

</body>
</html>

Related Tutorials