Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>CSS Floats</title>
</head>
<body>
  <div class="box-holder">
    <div class="box box-1 box-square">1</div>
    <div class="box box-2 box-square">2</div>
    <div class="box box-3 box-tall">3</div>
    <div class="box box-4 box-square">4</div>
    <div class="box box-5 box-square">5</div>
  </div>
</body>
</html>
 
.box-holder {
  width: 300px;
  height: 200px;
  background-color: #fff;
}
.box {
  width: 100px;
  float: left;
}
.box-square {
  height: 100px;
}
.box-tall {
  height: 200px;
}
.box-1 {
  background-color: #eee;
}
.box-2 {
  background-color: #ddd;
}
.box-3 {
  background-color: #ccc;
}
.box-4 {
  background-color: #bbb;
}
.box-5 {
  background-color: #aaa;
}
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers