dorayme a écrit :
> > Your CSS rule removes all the margins on all
> > elements, even those which have no relation with the noticed gap.
>
> That does not mean it is useless as a quick check on something, to give
> a clue on how to investigate further.
Then use a targeted, specific check on the margin-top of the targeted
element. You do not need to over-use, abuse, over-kill. By relying on
the universal selector, you still do not know which element had an
effect. You do not know what actually cause the gap to be removed.
It's very bad practice and I see this sort of zero-ing the browser
stylesheets more and more often in stylesheets which in fact is more
about overcoming the flaw and incorrect implementation of IE 5, IE 6,
IE 7 than about uniforming just a few elements that have different
defaults in browsers.
>
> > You
> > can easily create side effects with such kind of rule.
>
> Like what? It is completely irrelevant to answer with cases of side
> effects of the permanent use of the universal selector.
>
Any browser could have differences of margins and padding for
elements. Like Eric Meyer said, using the universal selector on all
elements will affect text inputs and textareas. It's besides the
point: do not use a canon when all you just need is a fly-swatter. Do
not use a class when using an id is more to the point, more targeted.
Avoid Universal Rules!
http://developer.mozilla.org/en/docs...ersal_Rules.21
because it's inefficient!
> > You use the
> > universal selector, you know... You didn't just use a selector on an
> > unique DOM element.
> >
> > > Not presented as a fix at all, but simply a
> > > diagnostic tool.
> >
> > Well, that is a bad diagnostic tool. An unreliable one. A not-
> > trustworthy diagnostic tool.
> >
>
> You appear to be ignoring the distinction between permanent and
> temporary that Gus has indicated.
Lots of people in their stylesheets are now using such "'TEMPORARY'"
solution or detection method. And that's bad programming, bad
recommendation, bad detection method.
Gérard