HighDots Forums  

gap rendered in Firefox 3 but not in IE 7

alt.html alt.html


Discuss gap rendered in Firefox 3 but not in IE 7 in the alt.html forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Gus Richter
 
Posts: n/a

Default Re: gap rendered in Firefox 3 but not in IE 7 - 06-13-2008 , 10:39 PM






GTalbot wrote:
Quote:
I do not think you did not provide the reason actually.
Two negatives results in a positive. ;-)

Quote:
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..
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 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.

--
Gus



Reply With Quote
  #12  
Old   
GTalbot
 
Posts: n/a

Default Re: gap rendered in Firefox 3 but not in IE 7 - 06-14-2008 , 10:25 PM






Gus Richter a écrit :
Quote:
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,
it removes _all_ margins on **each and all elements** of the document.
Not just all the margins of one element.


Quote:
but who
cares? It is only to temporarily look at the "noticed gap" area.
You obviously don't care. Universal selector usage is highly
suspicious of over-killing and over-declaring in a stylesheet.

Quote:
--
Gus
What you coded is a risky, is not recommendable, is not reliable and
is not trustworthy way to detect a problem or to propose a solution.
Again, you are removing all margins of all elements in a document. You
are not removing the margin-top of a single element. You mis-target.
You over-remove all margins on all elements, even on elements which do
not have a margin anyway.

Gérard


Reply With Quote
  #13  
Old   
GTalbot
 
Posts: n/a

Default Re: gap rendered in Firefox 3 but not in IE 7 - 06-14-2008 , 10:28 PM





Gus Richter a écrit :
Quote:
GTalbot wrote:

I do not think you did not provide the reason actually.

Two negatives results in a positive. ;-)

I misworded that. I 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..


Quote:
I agree that IE is the buggy culprit here.
You did not mention that.

Quote:
The fact that IE does not
collapse margins properly
You did not provide the correct reason.

Quote:
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
and it was a bad tool, a bad way, a bad detection method.

Gérard


Reply With Quote
  #14  
Old   
GTalbot
 
Posts: n/a

Default Re: gap rendered in Firefox 3 but not in IE 7 - 06-14-2008 , 10:53 PM



dorayme a écrit :


Quote:
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.

Quote:
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!


Quote:
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


Reply With Quote
  #15  
Old   
GTalbot
 
Posts: n/a

Default Re: gap rendered in Firefox 3 but not in IE 7 - 06-14-2008 , 11:23 PM



Gus Richter a écrit :

Quote:
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".
Load these pages in IE 7, Firefox 2+, Opera 9.x, Safari 3.x, Hv3
TKHTML, Icab 3+.

http://www.gtalbot.org/BrowserBugsSe...MarginBug.html
http://www.gtalbot.org/BrowserBugsSe...arginBug2.html
http://www.gtalbot.org/BrowserBugsSe...arginBug3.html

Then apply your "detection tool" and the rendered page will be
incorrect, misrendered: removing the body and the <div>'s margins are
not justified, not correct. Adjoining margin collapsing is *not* the
same as absence of margin or margin: 0 everywhere for every element
(even inline elements!).

Your so-called detection tool can be found in many webpages'
stylesheets and in articles (by google-ing about it, I found *many* eg
http://leftjustified.net/journal/200...lobal-ws-reset) promoting
it as a way to reset just a few browser default differences.

The bottom line I am saying is that if you need to apply/set the
padding left and margin left to a few elements (like lists and list-
items), then you shouldn't use the universal selector.

Quote:
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.
It does not work for me and for cases involving adjoining margin
collapsing. Resetting margins to 0 and collapsing margins is *not* the
same thing.

Gérard


Reply With Quote
  #16  
Old   
dorayme
 
Posts: n/a

Default Re: gap rendered in Firefox 3 but not in IE 7 - 06-15-2008 , 12:53 AM



In article
<c4913778-68f1-4e58-805d-493ecc9855c9 (AT) k37g2000hsf (DOT) googlegroups.com>,
GTalbot <newsgroup (AT) gtalbot (DOT) org> wrote:

Quote:
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.
"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!

--
dorayme


Reply With Quote
  #17  
Old   
Neredbojias
 
Posts: n/a

Default Re: gap rendered in Firefox 3 but not in IE 7 - 06-15-2008 , 02:08 AM



On 14 Jun 2008, dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote:

Quote:
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!
I can see your point about "temporary", but I still pretty much agree
with GTalbot nonetheless. If one has no idea what the problem is, a
universal change will hardly really help, and if one _does_ have any
idea at all, he/she/it should go to that element.

--
Neredbojias
http://www.neredbojias.net/
Great sights and sounds


Reply With Quote
  #18  
Old   
dorayme
 
Posts: n/a

Default Re: gap rendered in Firefox 3 but not in IE 7 - 06-15-2008 , 02:44 AM



In article <Xns9ABE1747DD61neredbojiasnano (AT) 85 (DOT) 214.90.236>,
Neredbojias <me@http://www.neredbojias.net/_eml/fliam.php> wrote:

Quote:
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,
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.

--
dorayme


Reply With Quote
  #19  
Old   
Neredbojias
 
Posts: n/a

Default Re: gap rendered in Firefox 3 but not in IE 7 - 06-15-2008 , 05:48 AM



On 15 Jun 2008, dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote:

Quote:
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.

--
Neredbojias
http://www.neredbojias.net/
Great sights and sounds


Reply With Quote
  #20  
Old   
dorayme
 
Posts: n/a

Default Re: gap rendered in Firefox 3 but not in IE 7 - 06-15-2008 , 06:20 AM



In article <Xns9ABE26D046BA9neredbojiasnano (AT) 85 (DOT) 214.90.236>,
Neredbojias <me@http://www.neredbojias.net/_eml/fliam.php> wrote:

Quote:
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.
What has this got to do with using say * {margin: 0} for less than 2
seconds (in which time you do *not* try to identify anything positively
or "fix" anything or run into any dangers whatsoever. You just look to
see if some unwanted look is affected for the better. If you think it is
a waste of time, make sure you never do it, not even to waste 2 sec.
Others will use it and it will often be worth the 2 secs.

To see this point, you need to understand the spirit in which it is used
and not jump to too many conclusions.

--
dorayme


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.