<!doctype html>
<html>
<head>
<title>test</title>
<style type="text/css">
body {
padding: 0;
margin: 0;
}
.a {
background-color: #ff8000;
overflow: hidden;
}
.b {
height: 300px;
background-color: #00ff40;
float: left;
}
</style>
</head>
<body>
<div id="a" class="a">
<div id="b" class="b">
</div>
</div>
<script type="text/javascript">
var a = document.getElementById("a");
var b = document.getElementById("b");
alert(a.offsetHeight);
alert(b.offsetHeight);
</script>
</body>
</html>