<style type="text/css"> #parent {backgroud: red; height: 0; width: 100px} #child {background: blue; height: 100px; width:100px;} </style> <div id="parent"> content <div id="child"> child content </div> </div>