We would like to know how to control parent height from children tag.
<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
.warpper {<!-- w w w . j a v a 2 s. com-->
margin: 0 auto;
width: 500px;
background: red;
border: 2px solid green;
}
.container {
width: 450px;
margin-left: 50px;
background: yellow;
height: 300px;
}
</style>
</head>
<body>
<div class="warpper">
<div class="container"></div>
</div>
</body>
</html>
The code above is rendered as follows: