<!DOCTYPE html> | |
<style> | |
.container { | |
width: 150px; | |
border: solid 2px; | |
} | |
.left { | |
float: left; | |
background: green; | |
width: 100px; | |
height: 100px; | |
} | |
.right { | |
float: right; | |
background: green; | |
width: 100px; | |
height: 100px; | |
} | |
</style> | |
<div class="container"> | |
<div class="left"></div> | |
<div class="right"></div> | |
</div> |