Your best bet is again to not use hacks. This is achieved in a couple of ways. First, you can break your XHTML markup down a little more. That means, for example, instead of one div
layer:
<div id="leftSide">...</div>
with the assigned rule:
#leftSide{ width: 200px; border: 2px; padding: 10px; }
This is clearly going to give you problems in quirks mode IE, because the div
will stay at 200 pixels wide and squish your border and padding inside it. It would be better to tuck an extra div
or other XHTML element inside the leftSide
id such as:
<div id="leftSide"><div>...</div></div>
Then, you can control the width and borders much more accurately using CSS that looks as follows:
#leftSide{ width: 200px; } #leftSide div{ border: 2px; padding: 10px; }
Using a fix like that, your div
will always be 200 pixels wide (despite the border and padding) in all the browsers, regardless of quirks mode. Plus, your XHTML markup and CSS stays valid.