Talk:Internet Explorer box model bug
Appearance
tantek's box model hack is big and clunky, IMO it's much more elegant to just do
padding: 50px; width: 200px; width: "300px";
the final rule is only read by IE in quirks mode as it ignores the quotes, providing they correctly wrap the value. you can also narrow the rule to be truly IE-only by prepending an underscore:
_width: "300px";
as only IE (in quirks mode) will treat "width" and "_width" as the same thing.
obviously, though, this does not validate against the w3c standards but is much easier to use in a css file as it is inline, all that is needed is a comment explaining WTF it does, final result:
div.mydiv { padding: 50px; width: 200px; _width: "300px"; /* hack: IE 5 box model width */ }
i've been plugging away at explorer and have a test page showing various "inline" hacks at my website http://www.cyclomedia.co.uk/?9