james438
08-08-2007, 05:08 PM
I have recreated a test page (http://www.animeviews.com/test.php) where you can see the problem. (link no longer shows the bad code)
I added the -moz-box-sizing: border-box; to Firefox to get it to display properly, and added
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
to get ie to behave, but I hear that the transitional is going out of date, so I changed it to strict. Here is the code for the page:
<html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<div style='padding-left:60%;width:70%;box-sizing:border-box;
-moz-box-sizing:border-box;background-color:blue;'>
<div style='padding:1em;background-color:orange;'>
</html>
Any ideas why the above is expressed differently in IE7?
I added the -moz-box-sizing: border-box; to Firefox to get it to display properly, and added
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
to get ie to behave, but I hear that the transitional is going out of date, so I changed it to strict. Here is the code for the page:
<html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<div style='padding-left:60%;width:70%;box-sizing:border-box;
-moz-box-sizing:border-box;background-color:blue;'>
<div style='padding:1em;background-color:orange;'>
</html>
Any ideas why the above is expressed differently in IE7?