Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
<!--[if IE]>
  <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
  
</style>
</head>
<body>
  <br>
  <p align="center"> Resize browser window to see the effect. </p>
    <div id="container">
    
        <div id="first">FIRST</div>
        <div id="second">SECOND</div>
      <div id="third">THIRD</div>
          
    </div> 
</body>
</html>
 
body {margin:0;padding:0}
    
#container {
  width: 360px;
  margin: 0 auto;
  background: #f2f2f2;
  height: 100%;
  text-align: center
}
#first, #third {
  width:240px;
  height: 200px;
  background: #aaa;
  float:   left;
  text-align: center
}
#second {
  width: 120px;
  height: 200px;
  background: #f00;
  float: right;
  text-align: center
}
#third { background: yellow; float:left; clear: left;}
div {   transition:all .2s linear; 
    -o-transition:all .2s linear; 
    -moz-transition:all .2s linear; 
    -webkit-transition:all .2s linear;}
    
    @media only screen and (min-width: 480px) and (max-width: 767px)                             {
        #container {width: 300px;}
        #first, #third {width:300px;height: 200px;}
        #second {width: 300px;height: 200px;}
    }
Output

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers