views:

371

answers:

1

I've seen Ryan Fait's method for sticky footer as well as one here and here.

Why are these people making templates for sticky footers when #footer{position:fixed; bottom:0;} will suffice?

EDIT:

I will add that using position: fixed; for a footer does break margin: auto; centering in (at least) some browsers, thus creating the need for a wrapper tag. Part of my problem with the above mentioned methods is the extra tags which are confusing, syntactically incorrect (for the "HTML purists") and it eats bandwidth. However, a single wrapper around the footer is still, in my opinion, better than a whole jumbled page template to have to start with. And, "my" way is still more straightforward and eats less bandwidth.

+5  A: 

Three words: Internet Explorer Six.

Shog9
And in 2010, is IE6 really worth worrying about? EDIT: +1 for the link.
Moshe
@Moshe: that's for you to decide. If you're ok with your footer not being sticky in IE6, then go ahead and use `position: fixed`. I do... Except for the internal apps that *do* need to support IE6.
Shog9
Yes. http://marketshare.hitslink.com/browser-market-share.aspx?qprid=2
Tomas Markauskas
http://www.w3schools.com/browsers/browsers_explorer.asp10% says yes
Bernhard Hofmann
@Shog9, what about auto-centering the footer if it's narrower than the page? (Wrapper tag?)
Moshe
@Moshe, IE6 has a significant market share still, and is extremely common in large corporate enviroments still. Unfortunately it is worth worrying about :(
Paul Creasey
@Tomas Markauskas- The truth is, IE6, despite being second on the list is still only 20% of the market. And, something like a sticky footer (at least in my design) doesn't make or break the site. @Paul - the site I'm working on is targeting a particular community, not a corporate environment.
Moshe
Actually I think the time is already here that it's not completely insane to exclude IE6 from *some kinds* of sites: some corporate-type web applications with up-front business interactions, for example. For a "public" site however I think it's still necessary to cater to IE.
Pointy
@Moshe: I would do that, yes. Unless you're able to specify a % width, in which case you could just fix the horizontal position at half of what's leftover.
Shog9
@Shog9 - Thanks. On a final note, What is wrong with using javascript for IE6, to keep the page semantics the way they should be? The use of javascript for positioning was argued against by purists, partially because not all browsers handle javascript the same way and because you can't know who has javascript turned off. In this case, the only issue with javascript is "What percent of 20 percent have javascript on or off?" It's not like we don't know what browser we are targeting with the script and therefore, javascript should be fairly straightforward.
Moshe
@Moshe: Ever scrolled through a page that tries to simulate "position: fixed" using JavaScript? It doesn't quite look right... And in some cases, it slows down the rendering dramatically. I have, however, used JavaScript to implement something similar to the templates you link to on an as-needed basis (primarily to handle variable-height footers though).
Shog9
@Shog9 - True, javascript rendering does feel funny, but that is ghow IE6 should feel in the modern world, no? It *is* IE6 we're talking about. You know, the browser that sat on its success for years, while waiting for competitors to catch up. This is the same browser that broke many-a-standard layout. Yes, javascript does feel odd funny here, but considering IE6 as it is, that's the best I'm willing to offer in many cases. JS for IE6 saves bandwidth of wrapper tags and CSS in other browsers.
Moshe
Microsoft just made an IE6 funeral. TechCrunch and Cnet reported it. Google it.
Moshe