how to make the footer to stick exactly at the bottom of the page?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-11 16:03:32

问题


I'm using ASP.net Master page. I've a footer in my page. When content of my page is less, the footer is coming in the middle of the page.

What do i need to do. please suggest.

Thanks.


回答1:


One more link for the same think

http://www.cssstickyfooter.com/




回答2:


You can implement a CSS sticky footer: http://ryanfait.com/sticky-footer/. Using a little bit of CSS (see http://ryanfait.com/sticky-footer/layout.css) the footer will stick to the bottom as much as possible:

  1. If the page's content is higher than 1 viewport: nothing happens.
  2. If the page's content is not higher than 1 viewport: the footer creates whitespaces and prefers to stick to the bottom.

Er... there should be more rules...



来源:https://stackoverflow.com/questions/3063393/how-to-make-the-footer-to-stick-exactly-at-the-bottom-of-the-page

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