les dejo el codigo
Código:
CSS</head> <body> <div id="contenedor"> <div class="clear"></div> <div id="interior"> Don't set the height of a div to 100% unless it's container element has a specific height set. 100% of auto = auto. If Microsoft value CSS compliance then IE7 will likely fix the bug in IE6 that makes it respond to height=100% because it is wrong according to the CSS specification. So don't waste any more time thinking about "how can I get this trick to work in other browsers?". Don't set the height of a div to 100% unless it's container element has a specific height set. 100% of auto = auto. If Microsoft value CSS compliance then IE7 will likely fix the bug in IE6 that makes it respond to height=100% because it is wrong according to the CSS specification. So don't waste any more time thinking about "how can I get this trick to work in other browsers?". </div> <div class="clear"></div> </div> </body> </html>
Código:
body { margin: 0px; text-align: center; height: 100%; } #contenedor { width: 700px; background-color: #CCCCCC; margin-left: auto; margin-right: auto; height: auto; } #interior { width: 500px; height: 500px; margin-left: 100px; float: left; }