Forum Moderators: not2easy
I've encountered a strange problem using css for a <div> tag to have it overflow: auto. The overflow: auto does not work like it should, the text is shown in its full length over the whole page, not only within the 200 pixels specified by the height: attribute.
However, if I remove the <!doctype..> line or if I add a <dummytag> before the doctype starts, it works.
Has anyone ever seen such an error? It occurs both in FF 1.0.7 and IE 6.
Cheers!
My html document looks like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
<head>
<title>foo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<div id="divname" style="overflow: auto; height: 100;">
foo barfoo barfoo barfoo barfoo barfoo barfoo barfoo
[ huge text snipped ]
</div>
</body></html>
eg. px, em, %, ...
;)
Standards vs. Quirks Mode - overview [webmasterworld.com]
The Box Models - standards vs quirks [webmasterworld.com]