<style type="text/css"> .box { width: 200px; height: 100px; padding-top:40px; padding-bottom: 40px; border-top-width: 10px; border-top-style: solid; border-top-color: #000000; border-bottom-width: 10px; border-bottom-style:solid; border-bottom-color: #000000; #brown { background-color: brown; margin-bottom: 100px} #green { background-color: green; margin-top: 100px} </style> <div id="brown" class="box"> </div><div id="green" class="box"> </div>