View Single Post
Old May 28, 2009, 20:10   #1
EricWatson
SitePoint Wizard
 
EricWatson's Avatar
 
Join Date: Dec 2007
Location: Carlsbad, CA
Posts: 1,189
IE8 Bug I need to fix?

IE8 Bug I need to fix? All other browsers are fine. I just noticed that IE8 is fubaring some of my code examples. All my code examples go into a pre with a max-height of 340px and a width of 500px. But whenever the code exceeds the 500px width (even if it's only one line tall!), it blows out the pre to it's max height of 340px. Here is some code to test if you'd like. I tried for about twenty minutes trying different things to no avail. Thanks!

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>{ visibility: inherit; } Testing</title>
<style type="text/css">
<!--
pre {
display:block;
border:#000 solid 1px;
overflow:auto;
max-height:340px;
width:500px;
padding:10px;
background:#ccc;
margin:2em 0;
}	
-->
</style> 
</head>
<body>

<pre>TextTextTextTextTextTextTextTextText TextTextTextTextTextTextTextText TextTextTextTextTextTextText</pre>

</body>
</html>
EricWatson is online now   Reply With Quote