How to avoid fixed element from hovering page contents?

守給你的承諾、 提交于 2019-12-25 07:28:12

问题


I'm trying to do a standard sticky footer but with unknown height. How to avoid page's contents from going behind it?

CSS

#nav { 
   padding: 20px;
   position: fixed;
   bottom: 0;
   left: 0;
   width: 100%;
}

HTML

<p>Some contents (...)</p>
<div id="nav">Navigation</div>

JSFIDDLE

http://jsfiddle.net/wxTUW/

(I know there are multiple sticky footer solutions but all seem outdated or / and not cross-browser compatible, how about css3?)

来源:https://stackoverflow.com/questions/15487692/how-to-avoid-fixed-element-from-hovering-page-contents

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