Story: Firefox? Bah Humbug, I say
Hi John.
I read your article today. Sorry to say, but the problems are some you and IE introduce together :)
With the DTD you use, IE goes into quirks-mode and act as wrongly as it always has done. It simply doesn't comply to W3C standards.
To make it switch into standard-complient mode, you have to have the URL present in the DTD:
Read about it here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnie60/html/cssenhancements.asp
If you set a relative height on an element, it takes the height from it's containing element - according to the W3C Box-Model. Therefore, you have to set the height on each element - also the body and the documentElement (the 'html-element'). In most ways the two latter are not different from other HTML-elements.
Your CSS-code should look something like this:
html, body {
height: 100%;
overflow: hidden;
margin: 0px;
padding: 0px; /*Opera needs this*/
}
body
{
background-image: url('demoback.gif');
}
... and so on.
But as you set your div-container to be 100% of 100% of 100% ... it doesn't matter what overflow you give it. When you have overflow:hidden on the containing elements, it'll get no scrollbar.
No offence - but you ought to brush up your CSS-knowledge. FireFox is infact showing your page according to W3C and the code, you have written - IE is not :)
You can always test if the browser is in standard-complient mode with JavaScript:
alert(document.compatMode)
... returns 'CSS1Compat' if in standard-complient mode. Opera returns 'QuirksMode' - all others 'BackCompat' if not.
The JavaScript you write about is infact not JavaScript, but ECMA-DOM bindings. They are under W3C's control while the JavaScript standard is Netscape's standard. You can use ECMA-DOM bindings in both JavaScript, JScript and VBScript
It is correct, that you can use document.all, but document.getElementById is hell of a lot faster in all IE's after 5.0. It may not matter if you call only one element - but it makes a lot of difference in a larger DHTML application.
And talking about JavaScript, the JavaScript pseudo-protokol was designed for running JS in the address-line of the browser - instead of the the FTP- or HTTP-protokol. The link's href was designed for page-navigation.
Therefore it makes the code more logic, if you use the link's onclick-handler, that was designed for nothing but handling JS:
B
instead of:
B
By returning false, you disable the default action of the link - and you can infact write what ever you like in the href. If the client has disabled JS nothing bad will happen with a hash-mark, though ;o)
Talking about :)
TEST
Will open a popup if JS is enabled - and just navigate to the page if not ;o)
I work as Interface Developer ... this is what I do.
I'm not 'religious' in any way ... not especially pro or contra this or that ... I'm not a DIV/CSS-mullah, but use a lot of tables, when they are best for the job.
On the other hand - I know the W3C recommandations inside out ... I know the browsers from NS2/IE3 and up inside out ... I write JavaScript like others write shopping-lists. Trust me, I know what I'm talking about :)
I didn't feel like hanging you out to dry by commenting on the article, so I tried to mail you - but your address doesn't work.
I don't feel a need to proof myself, but would like to teach you a couple of tricks instead. Now I write it here anyway - and hope, you don't feel offended :)
Full Talkback thread
Story: Firefox? Bah Humbug, I say
-
You're weird. Alexandre Juneau -
Forget Browsers getting anoyed at not being p... Samuel -
Bad luck about the traps inherent in standards est... Thomas Flewell -
You misunderstand how CSS height works. The outer... Jason Barnabe -
John Carrol? Bah Humbug, I say.
John Carrol is one... Arthur B. -
Firefox measures up to the challenge: Carrol... Anonymous -
Well of course John Carroll says 'Bah! Humbug!'. I... Chris Rankin -
I agree with Chris view but, wanted to uneart... sanjay -
I've found you can eliminate most browser inconsis... Damien Conlon -
Having been involved in several e-commerce pr... David Wright -
The whole point of a browser is to view web pages.... Mark Jamies -
I have started using Firefox in the past few... Tim Jensen -
Older browsers?
Come on guys. You know t... squid -
squid wrote:
"Older browsers?
Come... Anonymous -
Sentient AI is something that humans develop.... Kaisa Hannele Tervola -
http://yansanmo.no-ip.org:8080/test/css/bah-humbug... kwanbis -
Is this article simply saying that the author has... Gareth Williams -
John Carroll. You are a muppet.
I honestly cannot... Anonymous -
Hi John.
I read your article today. Sorry to say,... Ole Clausen -
To Ole Clausen, thanks for your thoughtful re... John Carroll -
John Carroll writes:
I take it, though,... Ted Powell -
In other news, I suggest that the Oxford... Anonymous -
Save us from all the giant browsers needed for par... Ole Clausen -
Firefox is actually the browser that is rendering... Anonymous -
When using any software application, including the... Sam Alexander -
John Carrol writes:
Likewise, as my article sugges... Adam -
John, you write:
"As a web developer, I have to de... Ole Clausen -
It's about time!
I know very little about web-deve... Bryan markis -
I am reporting you and your anti-FireFox article i... Ignatius Reilly -
If Firefox is a Bag umbug, what IE is? Anonymous -
Its Insane to judge firefox on this. The page you'... David Hyde -
Finally, some balance to the pointless rounds of I... Terry Pettitt -
The very fact that you ignore the advantages of CS... Anonymous -
Hi John,
I wanted to let you know that I have quot... Chris Beach -
Like Chris, I was glad to see someone saying what... Josh Titcomb -
I have been using Firefox for sometime now and fou... trevor johnson -
alexandre juneau you stole my name for i too go by... alexandre juneau
Back to: Firefox? Bah Humbug, I say

