Micky Hulse wrote:
> Hi,
>
> Would it be wise (or, does it do any harm) for me to specify "inline"
> for all of my floated layout divs like so:
>
> #primaryContent, #secondaryContent, #tertiaryContent {
> width: 200px;
> float: left;
> display: inline;
> }
>
> ... basing the above on this comment:
>
> "All versions of InternetExplorer suffer from the DoubleMarginBug.
> Floats magically acquire excess margin, or their internal elements do.
> The fix is remarkably simple: apply the rule display: inline to the
> floated element. This has no meaning to other browsers, since floating
> an element automatically forces its display value to be "block"."
> -- "Bugs" <http://css-discuss.incutio.com/?page=FloatedBlock>
>
Micky,
I've never once had an issue with letting other browsers see the
display: inline on floats. I can't say whether or not it will hurt IE to
have it on all floats, even the ones that don't need it, as I've never
tested this. I don't imagine that it would hurt. However, I still would
only add it to the floats that actually need it, because:
1. Those extra declarations mean extra bytes that your users have to
download needlessly.
2. Those extra declarations junk up your style sheet, making it harder
for you maintain. You'll have a hard time remembering why you added
those lines later, and will wonder whether you can take them out, and
then maybe you'll take them all out and screw up IE. So, you think, I'll
just comment each one so I know why it's in there, but then you just
exacerbate problem #1.
I recommend always adding the fewest CSS rules needed, keeping your
style sheets as lean and clean as possible.
Zoe
--
Zoe M. Gillenwater
Design Services Manager
UNC Highway Safety Research Center
http://www.hsrc.unc.edu
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/