> Any particular reason why box model hacks are used so much? Is it just
> preference?
>
> Usually what I do to get around IE's box model problems is doubling up
> key blocks. Example:
>
> <div id="masthead">
> <div class="inside">
> ... content ...
> </div>
> </div>
>
> with CSS looking like this:
>
> #masthead { width: 740px; }
> #masthead .inside { padding: 1em; }
>
> The idea is that the outer block has the width you want and any padding
> you need on the element is provided by the inside element. This is what
> I use in my layouts, which you can see at
>
http://webhost.bridgew.edu/etribou/layouts/.
>
> The really big advantage here is the use of fewer hacks (if any) in your
> layout. That means less chance of some of the more obscure or newer,
> future browsers from being caught up in the hacks and destroying the
> layout.
>
> The disadvantage is the redundant markup. But if you approach the layout
> the right way, it might not have to be so redundant.
Bookmarks