Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- Box model: lost parent element scrollbar


Rain_Lover - 6:50 am on Nov 6, 2012 (gmt 0)


The first sample shows scrollbars correctly:

<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
#parent {width:102px; height:101px; background:red; overflow:auto;}
#child {width:100px; height:100px; margin:1px; background:green;}
</style>
</head>
<body>
<div id="parent">
<div id="child"></div>
</div>
</body>
</html>


But the second doesn't:

<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
#parent {width:101px; height:102px; background:red; overflow:auto;}
#child {width:100px; height:100px; margin:1px; background:green;}
</style>
</head>
<body>
<div id="parent">
<div id="child"></div>
</div>
</body>
</html>


Why is that?
Thanks!


Thread source:: http://www.webmasterworld.com/css/4516196.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com