Yes, CSS can do this, you may find if your page uses floats, that this may have problems, but this is the most robust solution I have seen (cross browser) with CSS:
http://www.themaninblue.com/writing/perspective/2005/08/29/ Good luck! Cheers, -Alan On Nov 19, 5:24 am, Liam Potter <[EMAIL PROTECTED]> wrote: > I don't see the point of using jquery for this, this is all possible > with pure css. > > howa wrote: > > Consider the code: > > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" > > "http://www.w3.org/TR/html4/strict.dtd"> > > <html> > > <head> > > <title></title> > > <script type="text/javascript" src="jquery-1.2.6.min.js"></script> > > <script type="text/javascript"> > > > $(document).ready(function() { > > > var footer = $('#footer'); > > var w = ( $(window).width() - footer.width() ) / 2; > > footer.css('left', w); > > footer.css('display', 'block'); > > > $(window).scroll(function(){ > > > console.debug( $(window).height() ); > > > footer.css('bottom', 0); > > }); > > > }); > > > </script> > > <style> > > #footer{ > > background-color:green; > > height:30px; > > position:absolute; > > width:800px; > > bottom:0; > > display:none; > > } > > </style> > > </head> > > <body> > > > <p>Lorem ipsum dolor s.....eugiat.</p> > > <p>Lorem ipsum dolor s.....eugiat.</p> > > <p>Lorem ipsum dolor s.....eugiat.</p> > > > <div id="footer">Footer</div> > > </body> > > </html> > > > I want to footer always at the bottom, no matter I scoll the page. > > (while resize I don't care)