 <p>You can also make this:</p> <p><div class="snippet" data-lang="js" data-hide="false"> <div class="snippet-code"> <pre class="snippet-code-css lang-css prettyprint-override"><code>.outer{ margin-top: 10px; position:absolute; width:80px;height:80px; border:1px solid #d3d3d3; padding: 1px; } .inner{ position:relative; width:100%; height:100%; background:red; }</code></pre> </div> </div> </p>