Hello. I'm working on a website that has pages with variable height.
However, the footer is one of my main problems.

When the page can be scrolled, the footer needs to be [icode]position: relative[/icode].

When the window height is greater that the page content height (no scrollbar), the footer needs to be [icode]position: absolute[/icode] so that it stays at the very bottom (using additional styles, of course) and not in the middle of the page, as [icode]position: relative[/icode] causes.

Right now, the following code works for NON-variable height pages IN WEBKIT BROWSERS ONLY:

[code=javascript]
setInterval("footer()", 100) // Run the footer-check function every 100ms
function footer(){
if (window.innerHeight > 900){ // is window height is greater than pg height?
document.getElementById('footer').setAttribute("class","_abs"); //make position absolute
} else {
document.getElementById('footer').setAttribute("class","_rel"); //make position relative
}
}
[/code]

This sets the class of the footer to "_abs" or "_rel" which changes the position of the footer (relative/absolute) and bottom/left (when it's absolute), as well as the padding (when it's relative).

It doesn't work in firefox, though. (I will test in I.E. later).

Can anyone suggest a way to make this work with variable height pages?
Can anyone suggest a way to make this work in Firefox, and if possible, ALL browsers?
Also, is it possible for any of this to be done without javascript?

Thanks very much in advance.
Nikhil

Thank you very much.
I did not need the entire script to be written for me. I just needed an outline.
This will do.

Thanks again!

Hello everyone. I'm an expert html5/css3 designer, but when it comes to javascript, I don't know anything...

I need some javascript code that detects a browser engine (webkit, gecko, etc.) and redirects based on that.

I need webkit and gecko to redirect to home.php and all others to redirect to basic.php.

I know people are going to tell me that if I was a good designer, I would design for all browsers/engines, and I agree. But I need this code for something completely un-related to design.

Thanks a lot in advance!

Thanks for your help... You rock!!

So -25 is the same thing as +26 ?
Thanks for your help!

Hello.
I have a file, with some HTML in it.
I would like to make a shell/bash script that moves ALL of the content of that file into ANOTHER HTML file at a CERTAIN line number...
Does anyone have any suggestions?

If not possible at a certain line, then at the END of the file.

Thanks a lot in advance
~ Nikhil

Hello.
I have a file, with some HTML in it.
I would like to make a shell/bash script that moves ALL of the content of that file into ANOTHER HTML file at a CERTAIN line number...
Does anyone have any suggestions?

Thanks a lot in advance
~ Nikhil