![]() | |
#11
| |||
| |||
|
|
I do not think you did not provide the reason actually. |
|
The reason is an incorrect implementation (a bug, if you prefer) of adjoining margin collapsing in IE 5, IE 6, IE 7. There is no buggy implementation in Firefox 1, Firefox 2, Firefox 3, Opera 9, Safari 3, Internet Explorer 8, Hv3 TKHTML, Icab 3+, etc.. |
#12
| |||
| |||
|
|
GTalbot wrote: You misunderstood my posting. The rule which I presented is only, as I said, a _check_ , and therefore only a _temporary_ thing. Even that is not true. Your CSS rule removes all the margins on all elements, even those which have no relation with the noticed gap. You can easily create side effects with such kind of rule. 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. G�rard Too bad you haven't tried it yourself, but then even if you had, you can use or disregard. It works very well for me. BTW, you seem to have concern that the universal selector affects other "side effects". This is true, since it removes _all_ margins, |
|
but who cares? It is only to temporarily look at the "noticed gap" area. |
|
-- Gus |
#13
| ||||
| ||||
|
|
GTalbot wrote: I do not think you did not provide the reason actually. Two negatives results in a positive. ;-) |
|
I agree that IE is the buggy culprit here. |
|
The fact that IE does not collapse margins properly |
|
only complicated the OPs problem in that he expected rendering as per IE and was therefore surprised that Firefox rendered with a gap. He wondered why this was so and his attempts to remove the gap all failed. He desired no gap. There are several solutions possible to removing the gap in conforming browsers (Firefox here) and one was proposed. I correctly answered the OPs query by informing him that the gap on his page as rendered by conforming browsers (Firefox here) is because of "Collapsing Margins". Additionally I provided a small tool |
#14
| |||
| |||
|
|
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. |
|
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. |
|
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. |
#15
| |||
| |||
|
|
I correctly answered the OPs query by informing him that the gap on his page as rendered by conforming browsers (Firefox here) is because of "Collapsing Margins". |
|
Additionally I provided a small tool to be able to quickly determine if a gap problem is due to collapsing margins, or not. You apparently don't like the tool - no problem, but it works for me. |
#16
| |||
| |||
|
|
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. |
#17
| |||
| |||
|
|
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. "Overuse, abuse, overkill" for zeroing margins and/or padding with a universal selector for a quick check? These strong words sound more appropriate when the target is something more substantial than a temporary diagnostic tool of elimination. In many cases one does not quite know what element to target. It is hardly abusing anything if it is used to eliminate something from the enquiring diagnostic mind. I understand your view about the dangers of zeroing margins and paddings by use of the universal selector. But this is not at all relevant. No amount of describing the evils of such universal zeroing intended for permanency will be obviously relevant to its use as a temporary measure of diagnosis. Sometimes, to locate some pesky problem, I have simply deleted half of a stylesheet, or all but one of several. Ditto with HTML. It is not something a rational person would do as a permanent fix, but it might assist one to narrow the area to be searched for some trouble. It would be hardly helpful for someone to be alarmed at this as if this is how the site will end up, chopped in two somehow! |
#18
| |||
| |||
|
|
On 14 Jun 2008, dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote: 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. "Overuse, abuse, overkill" for zeroing margins and/or padding with a universal selector for a quick check? These strong words sound more appropriate when the target is something more substantial than a temporary diagnostic tool of elimination. In many cases one does not quite know what element to target. It is hardly abusing anything if it is used to eliminate something from the enquiring diagnostic mind. I understand your view about the dangers of zeroing margins and paddings by use of the universal selector. But this is not at all relevant. No amount of describing the evils of such universal zeroing intended for permanency will be obviously relevant to its use as a temporary measure of diagnosis. .... If one has no idea what the problem is, a universal change will hardly really help, |
#19
| |||
| |||
|
|
I understand your view about the dangers of zeroing margins and paddings by use of the universal selector. But this is not at all relevant. No amount of describing the evils of such universal zeroing intended for permanency will be obviously relevant to its use as a temporary measure of diagnosis. ... If one has no idea what the problem is, a universal change will hardly really help, If a 2 sec zeroing of the margins makes the unwanted phenomena disappear, you know it might well be a margin problem and you can look more locally then. So your contribution makes no reasoned sense to me. |
#20
| |||
| |||
|
|
On 15 Jun 2008, dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote: I understand your view about the dangers of zeroing margins and paddings by use of the universal selector. But this is not at all relevant. No amount of describing the evils of such universal zeroing intended for permanency will be obviously relevant to its use as a temporary measure of diagnosis. ... If one has no idea what the problem is, a universal change will hardly really help, If a 2 sec zeroing of the margins makes the unwanted phenomena disappear, you know it might well be a margin problem and you can look more locally then. So your contribution makes no reasoned sense to me. Not really. If one element has unwanted/inadvertant/mistaken padding and the adjacent element has a wanted default margin, you've just "identified" the wrong problem thru carelessness. |
![]() |
| Thread Tools | |
| Display Modes | |
| |