When an element moves right in a relatively positional element, how do I make the height fill the parent element?
<div id="page"> <div id="left"></div> <div id="right"></div> </div>
#page { width: 980px; padding: 10px; background: #3C4B76; display: block; margin: 10px auto auto auto; position: relative; } #left { padding: 0; margin: 0; width: 230px; float: left; } #right { float: right; width: 720px; border-left: 1px solid white; padding: 5px 5px 5px 20px; height: 100%; position: relative; display: block; }
In this example, the #right element #right not fill the '#page' element, it just grows to size. If it's smaller than #page , I want #right populate the parent element.
source share