Full-width footer won't stick to the bottom

為{幸葍}努か 提交于 2019-12-24 01:18:03

问题


I didn't managed it to stick my full width footer to the bottom of my webpage. When the main content above the footer is beneath a certain height, there is a blank space underneath the footer. I've tried to use all kind of solutions like the folowing css code:

 html,body { margin:0; padding:0;min-height:100%;position:relative;}
 .wrapper { min-height:100%;   position:relative;_height:100% /* _height = for ie */  }
 .page { padding-bottom:400px; height:100%; }
 .footer { padding:0;margin:0 position:absolute; left:0; bottom:0; width:100%; height:400px; } 

Still the footer will stick to the bottom of the main content instead of the bottom of the page. I think there is nothing wrong with my css.

example: http://hertog-hengelsport.nl.testbyte.nl/checkout/cart/

I hope someone can point me to the solution!

Many thanks!

URL: http://hertog-hengelsport.nl.testbyte.nl Platform: Magento 1.7.2


回答1:


Use "position: fixed;" instead of absolute for the Footer




回答2:


.wrapper is position relative, that makes any child of it relative to the div and not to the page.



来源:https://stackoverflow.com/questions/12819287/full-width-footer-wont-stick-to-the-bottom

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!