The first sample shows scrollbars correctly:
But the second doesn't:Code:<!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>
Why is that?Code:<!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>
Thanks!



Reply With Quote

Bookmarks