[英]Distill: Fixing the footer to the bottom of the page
I have made a website using Distill
in R but I'm noticing that the footer floats halfway across the page if there's not enough content on it.我在 R 中使用Distill
创建了一个网站,但我注意到如果没有足够的内容,页脚会在页面中间浮动。 How can fix the footer to the bottom of every page?如何将页脚固定到每一页的底部?
Try adding this into your style sheet.尝试将其添加到您的样式表中。
To make a footer fixed at the bottom of the webpage, you could use position: fixed like I have ( Look here ).要将页脚固定在网页底部,您可以使用 position: fixed like I have ( Look here )。
#footer {
/* Look here*/ position: fixed;
padding: 10px 10px 0px 10px;
bottom: 0;
width: 100%;
height: 40px;
}
footer {
width: 100%;
position: fixed;
bottom: 0;
left: 0;
right: 0;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.