gpt4 book ai didi

css - 如何将页脚和栏移动到页面底部

转载 作者:行者123 更新时间:2023-11-28 07:49:25 24 4
gpt4 key购买 nike

如何将页脚和页脚栏置于页面底部。目前它位于内容的正下方。

我需要它位于页面的最底部。我正在为 WordPress 使用悉尼主题。

我有一个全屏图像,希望页脚位于最底部。

.footer-widgets {
padding: 5px 0;
background-color: #252525;
}
.footer .copyr {
color: #a8a8a8;
margin-bottom: 0;
}
.footer-widgets .widget-title {
text-transform: uppercase;
color: #c5c5c5;
line-height: normal;
margin: 5px 0 0;
}

/* widget info */
.widget-info .logo-footer {
margin-bottom: 5px;
}
.widget-info p {
margin-bottom: 5px;
}
.widget-info .infomation {
list-style: none;
margin: 0;
}
.widget-info .infomation li {
position: relative;
padding: 0 0 0 30px;
margin-bottom: 5px;
line-height: 24px;
}
.widget-info .infomation li.address:before,
.widget-info .infomation li.phone:before,
.widget-info .infomation li.email:before {
position: absolute;
left: 0;
top: 0;
content: "\f041";
font-family: "FontAwesome";
font-size: 16px;
}
.widget-info .infomation li.phone:before {
content: "\f095";
}
.widget-info .infomation li.email:before {
content: "\f040";
}

/* widget links */
.widget-links ul {
list-style: none;
margin: 0;
}
.widget-links ul li {
padding: 10px 0 7px;
}
.widget-links ul li:first-child {
padding-top: 0;
}
.widget-mail-subscribe p {
padding-bottom: 10px;
}
.widget-mail-subscribe .email-sub input {
width: 205px;
margin-bottom: 10px;
}

/*--------------------------------------------------------------
Bottom
--------------------------------------------------------------*/
img.wp-smiley,
img.emoji {
background: rgba(0, 0, 0, 0) none repeat scroll 0 0 !important;
border: medium none !important;
box-shadow: none !important;
display: inline !important;
height: 1em !important;
margin: 0 0.07em !important;
padding: 0 !important;
vertical-align: -0.1em !important;
width: 1em !important;
margin-bottom: 5px;
}
.site-footer {
background-color: #1c1c1c;
line-height: 35px;
padding: 15px 0;
}
.site-footer,
.site-footer a {
color: #666;
}
.site-footer .socials {
margin: 0;
list-style: none;
}
.bottom .socials li {
display: inline-block;
margin-left: 5px;
}
.site-footer .socials li a {
display: inline-block;
color: #666;
font-size: 14px;
background-color: #2e2e2e;
width: 35px;
height: 35px;
line-height: 35px;
text-align: center;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
-o-border-radius: 50%;
border-radius: 50%;
}
.site-footer .socials li:hover a {
color: #fff;
}

HTML

<?php
/**
* The template for displaying the footer.
*
* Contains the closing of the #content div and all content after
*
* @package Sydney
*/
?>
</div>
</div>
</div><!-- #content -->

<?php if ( is_active_sidebar( 'footer-1' ) ) : ?>
<?php get_sidebar('footer'); ?>
<?php endif; ?>

<a class="go-top"><i class="fa fa-angle-up"></i></a>

<footer id="colophon" class="site-footer" role="contentinfo">
<div class="site-info container">
<footer>
© Coffee Captain 2015. This site is for educational purposes only.
</footer>

</div><!-- .site-info -->
</footer><!-- #colophon -->
</div><!-- #page -->

<?php wp_footer(); ?>

最佳答案

尝试将此 css 添加到您的页脚

{
clear: both;
position: relative;
z-index: 10;
height: 3em;
margin-top: -3em;
}

最好也发布您的 html 以便我们解决您的问题(作为建议)

关于css - 如何将页脚和栏移动到页面底部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30521120/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com