I'm not a front-end programmer, but I first realized the issue just when I found the css.maxHeight is not supported by HTML4.0. when the DOCTYPE refers to HTML4.0, maxHeight in css doesn't work, but change the DOCTYPE to XHTML1.0, it works.
So, now have the question, What the difference between the support for css by HTML4.0 and XHTML1.0? or, where can I get the comparison chart or statistic?
Edit: -- sorry for the mistype, it's maxHeight not maxLength--
what the css.maxHeight i mean is just by the simple code as below, the backgroundColor works in HTML4.0 but maxLength no.
<script languague="javascript" type="text/javascript">
$(document).ready(function() {
var div = $("div");
div.css({ maxHeight: 200,
overflow: 'auto',
backgroundColor:'#eee'
});
});
</script>
and here is the two type of DOCTYPE references
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">