473,778 Members | 1,804 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IE compatible way of forcing footer to bottom of page?

Hi

When the height of the content of a webpage is less than the height of
the viewport, I would like to force the footer to the bottom of the
viewport; whereas when the height of the content of the webpage
exceeds the height of the viewport, then I would like the footer to be
at the bottom of the webpage (so not visible until you scroll down to
it).

I tried using the method described at http://tinyurl.com/2upa7l but it
doesn't work in IE6 or in IE5.5 (although it does work in IE7) - see
my mock-ups at http://tinyurl.com/2urjf2 (short content) and
http://tinyurl.com/393k5n (long content).

My problem is that (unfortunately) around 32% of users are still using
IE5.5 or IE6 (see http://tinyurl.com/56kp), and I therefore expect a
large percentage of the visitors to my site to be IE 5.5 and 6 users.

Is there any cross-browser-compatible way of achieving the above
objective?

Dave
Mar 28 '08 #1
5 4625
I've found the answer - the solution is described at http://tinyurl.com/a8u5w
.. It is almost identical to the method I was using but it includes the
following addtional line:

* html #nonFooter {height: 100%;}

With the addtion of this line, it works in all browsers including
IE5.5. I don't understand why it works though - does anyone understand
the significance of the asterix? And of what the difference is between
#nonFooter and * html #nonFooter?

Dave
Mar 30 '08 #2
In article
<c1************ *************** *******@b64g200 0hsa.googlegrou ps.com>,
Dave Rado <da*******@dsl. pipex.comwrote:
I've found the answer - the solution is described at http://tinyurl.com/a8u5w
. It is almost identical to the method I was using but it includes the
following addtional line:

* html #nonFooter {height: 100%;}

With the addtion of this line, it works in all browsers including
IE5.5. I don't understand why it works though - does anyone understand
the significance of the asterix? And of what the difference is between
#nonFooter and * html #nonFooter?
Morning, Dave. The asterisk in css is a universal selector and unless it
is over-ruled later in the style sheet will have all elements following
its dictates. Thus, to look at a common example, * {margin: 0; padding:
0;} causes all margins and paddings to be set to zero.[1]

The asterisk before the html element is an interesting case and it is
used to take advantage of what has appeared to almost everyone (except
me to a certain extent[2]) as a bad misconception of Internet Explorer
prior to version 7. Because IE is the only truly religious browserit
alone recognises an element higher than the html element, and so it
takes note of the style concerned. Whereas other more atheistic browsers
ignore such babble. This enables authors to talk to IE and tell it to do
things that will not bugger up the other heathen browsers.

------
1. This is something to be done with caution as it then requires the
author to supply all the margins and paddings that were supplied by a
default style sheet (or styles supplied by the browser code).

2. Because of my very deep studies into the mysteries of the html
element and beyond, I have caught glimpses of the Beyond that IE6 (and
lower) instinctively know about. In my case, I have had work hard in a
field that is unnatural to me. I wear a special black cape and a sort of
wizard's hat in my pursuit of what I am calling Root Studies.

--
dorayme
Mar 30 '08 #3
Hi dorayme

On 31 Mar, 02:41, dorayme <doraymeRidT... @optusnet.com.a uwrote:
I find it easy enough to add an IE sheet and conditionally link it in
the head of the html.
My problem is that I'm finding some conditional css definitions are
needed just for IE5.5, others for IE6 and below, and still others for
IE7 and below, which means a potential requirement for up to three
conditional stylesheets (although Ben has just helped me get rid of
the "IE7 and below" one, unless I encounter another bug that applies
to IE 7 and below).

I'm already using a conditional stylesheet for IE5-specific styles,
but I do like the idea of using the * html hack to obviate the need to
have an "IE6 and below" conditional stylesheet as well; and it would
also be nice if there were a safe and reliable "IE7 and below" hack as
well, in case I find another bug that applies to IE7 and below but not
to IE8 beta.

I take your point about conditionals within the html body being very
useful at times.

Dave
Mar 31 '08 #4
In article
<e4************ *************** *******@i12g200 0prf.googlegrou ps.com>,
Dave Rado <da*******@dsl. pipex.comwrote:
Hi dorayme

On 31 Mar, 02:41, dorayme <doraymeRidT... @optusnet.com.a uwrote:
I find it easy enough to add an IE sheet and conditionally link it in
the head of the html.

My problem is that I'm finding some conditional css definitions are
needed just for IE5.5, others for IE6 and below, and still others for
IE7 and below,...
Do yourself a big favour, forget about IE below 6. At least don't worry
about them unless they so distort your meaning that great disaster can
ensue. For example you have a fan base among traffic engineers in the
darkest and smallest states of Africa and you know they are using less
then IE 6 and you are outlining your latest traffic management plan...

--
dorayme
Mar 31 '08 #5
On 2008-03-31, Dave Rado <da*******@dsl. pipex.comwrote:
[...]
I'm still confused about some aspects of this. If you look at the last
mock-up I posted in the previous thread you helped me with ("Is it
possible to vertical align in a div?", and the mock-up at
http://tinyurl.com/2otuph)
That URL expands to
http://localhost/swindle/Dev/Mockups...lativeProb.htm
Apr 1 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

82
10723
by: Peter Diedrich | last post by:
The site design is pretty simple: ============================================ | Head | ============================================ | | | | | | | | | left | center | right | | | | | | | | |
6
2155
by: Els | last post by:
Kris wrote: <quote> Liquid layout allows the footer to position itself at the end of the page, no matter how long or tall the page is. This is a Good Thing for various reasons that require a thread of their own. </quote> Well, Kris, here's a new thread for you, go ahead ;-)
5
14395
by: Tyler Carver | last post by:
I've tried to get CSS to give me a basic layout where I can place a footer at the bottom of the page and the top of the page I can use for content. I don't however want the footer to pull away from the bottom of the viewport if the top content is small. Also, when I resize the window I want the footer to move with the bottom of the page until I reach the content. Here is an example that works both in IE and Mozilla using tables. I...
17
1997
by: Cerebral Believer | last post by:
Hi all, I would like to know how to get two rows of text links to appear at the bottom of a page. Generally I have been using <div> tags with the id attribute and CSS to place blocks of text, tables and images where I want them to be, but this has got me a little stuck. My HTML code is: <div id="footer" class="footer"> Home | About | Essays | Discussions | Member Area | Links & Resources | Contact<p>
13
14943
by: Greg | last post by:
Most suggestions on this topic recommend to use a page footer and make it visible only on the last page. My problem is that the footer is half of the height of a page which means the detail would show on only the top half of each page with whitepace at the bottom of each page. How can I get the detail to fill each page with my "half page height" report footer at the bottom of the last page? Any suggestions to solve this would be...
1
5329
by: john | last post by:
Hi to All, I am new to html authoring, so sorry if my terminology is not correct or exact. I would like to position a footer div to the bottom of the browser window. As I research in the web shows this could be done a containing element with "min-height: 100%;" and an absolute positioned element (div) inside, aligned to bottom ("position: absolute; bottom:0px")
13
2392
Death Slaught
by: Death Slaught | last post by:
I have my entire page in my "main" div. div.main { width: 100%; height: 100%; border: 1px solid gray; } on the left of the page I have a banner.
11
2425
by: Michael7 | last post by:
Hi everyone, Me again, been a while since I've been here, but I'm back again needing help with a simple thing. I've searched for help on creating a footer, but all the help I've found, was absolutely nothing like what I was looking for. Could anyone help me with the very simple issue of creating a footer? I'm trying to create it on my index page (and all of the others, once I figure out HOW :) ) Here is the page:
13
1756
by: Dave Rado | last post by:
Hi When the height of the content of a webpage is less than the height of the viewport, I would like to force the footer to the bottom of the viewport; whereas when the height of the content of the webpage exceeds the height of the viewport, then I would like the footer to be at the bottom of the webpage (so not visible until you scroll down to it). I tried using the method described at http://tinyurl.com/2upa7l but it ...
0
9464
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10122
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9923
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8954
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6722
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5368
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4031
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3627
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2860
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.