[英]How do I make the footer cover the whole width of the screen?
I would like the footer to cover the whole width of the screen.我希望页脚覆盖整个屏幕宽度。 This is how it looks right now:这是它现在的样子:
Footer页脚
I would appreciate help!我会很感激帮助!
<!-- Footer -->
<div class="container">
<footer class="py-5 bg-dark" id="footer">
<p class="m-0 text-center text-white">© X <script>document.write(new Date().getFullYear());</script>. This website was made with Bootstrap.</p>
</footer>
</div>
Just take it out from the .container
只需从.container
中取出
<!-- Footer -->
<footer class="py-5 bg-dark" id="footer">
<p class="m-0 text-center text-white">© X <script>document.write(new Date().getFullYear());</script>. This website was made with Bootstrap.</p>
</footer>
or if you need .container
inside a footer
或者如果您需要在footer
中.container
<footer class="py-5 bg-dark" id="footer">
<div class="container">
<p class="m-0 text-center text-white">© X <script>document.write(new Date().getFullYear());</script>. This website was made with Bootstrap.</p>
</div>
</footer>
You can put that container div
tag inside footer
您可以将该容器div
标签放在footer
内
So that all the content of footer will be in container while the footer will be having 100% width这样页脚的所有内容都将在容器中,而页脚将具有 100% 的宽度
<footer class="py-5 bg-dark" id="footer">
<div class="container">
<p class="m-0 text-center text-white">© X <script>
document.write(new Date().getFullYear());
</script>. This website was made with Bootstrap.</p>
</div>
</footer>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.