Blair Mitchelmore wrote:
If inline-block worked cross-browser, we wouldn't have the floating
hell we have today. inline-block is not supported by firefox, and
won't be until firefox 3 is released.
And I'm not defending non-standard html (even though sometimes, the
standards are overly restrictive for no real reason) but I was trying
to duplicate an already existing behaviour and the only way to do it
was with non-standard html. But my real point was that javascript
generated html has no real incentive to be valid as it never gets
tested by validators and it works.
-blair
I just made the experience that scripting on top of an invalid DOM
causes more problems than trying to be compliant, no matter how the HTML
is generated.
If it's compliant you'll have at least some reliability otherwise not at
all.
I also just wanted to improve what you provided instead of rambling
about it. I apologize.
In fact, display: inline-block is already supported by Mozilla if you
use the vendor prefix: display: -moz-inline-block
A script could use that like:
$(...).css({ display: 'inline-block', display: '-moz-inline-block' })
Browsers other than Mozilla should ignore the second unknown value and
apply the first declaration, whereas Mozilla will apply the second one.
--Klaus