O'Reilly logo

WordPress Theme Design by Tessa Blakeley Silver

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Out-of-the-Box-Model Thinking

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; }

... which 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 like so:

<div id="leftSide"><div>...</div></div>

Then, you can control the width and borders much more accurately using CSS that looks like this:

#leftSide{ width: 200px; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required