<style type="text/css"> .box { width: 200px; height: 200px; display: inline-block; } #brown { background-color: brown; margin-right: 100px; } #green { background-color: green; margin-left: 100px; } </style> <div id="brown" class="box"/><div id="green" class="box"/>