Throw this in your header:
<script type="text/javascript" language="javascript">
<!--
window.addEventListener("load", function() { setTimeout(loaded,
100) }, false);
window.addEventListener("scroll" , pageScrolled ,false );
function loaded() {
document.getElementById("toolbar").style.visibility =
"visible";
window.scrollTo(0, 1); // pan to the bottom, hides the
location bar
}
function pageScrolled()
{
// alert('scrollY : ' + window.pageYOffset +' scrollX :
' +
window.pageXOffset);
document.getElementById("footer2").style.top = 480 +
(window.pageYOffset - 58 - 20 - 44) + "px";
}
//-->
</script>
Add a little flavor:
#footer2
{
background-image:url("images/bkgBot2.png");
background-repeat:repeat;
position:absolute;
top:360px;
height:58px;
width:100%;
color:#000000;
margin:0px;
padding:0px;
font-family: Helvetica;
font-size: 20px;
text-align:center;
text-shadow: white 2px 2px;
line-height: 53px;
}
And throw in some HTML
<div id="footer2"><a href="index.htm"><img
src="images/mainpage.png"
border="0" /></a></div>
You can see it in action here: http://www.maysnet.net/iphone/titans.htm
On Aug 29, 4:46 pm, dmose <[email protected]> wrote:
> I can't for the life of me figure out how to put a fixed footer in the
> UI?
>
> Similar to the toolBar, I just want a fixed div at the bottom of every
> page ... any ideas?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"iPhoneWebDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/iphonewebdev?hl=en
-~----------~----~----~----~------~----~------~--~---