开发者

fix sized div over flowing content issue

开发者 https://www.devze.com 2023-02-06 20:36 出处:网络
If I have fixed height for a content div, it\'s possible that the content will spill over the div. But the fixed height is to stop the footer from floating up into the middle of the page on pages with

If I have fixed height for a content div, it's possible that the content will spill over the div. But the fixed height is to stop the footer from floating up into the middle of the page on pages with less content. In other words it's there so that th开发者_JAVA技巧e footer is in the same place on every page. How do I fix this?


You can either use the min-height CSS property to define a minimum height for the content div, or position the footer absolutely with bottom: 0px


Probably you need something like New CSS Sticky Footer.


There is a technique called sticky footer. It can help you with your problem: http://ryanfait.com/sticky-footer/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号