我真的不太了解编码,而且我的开发人员已经黑了,所以我真的需要一些关于如何解决这个问题的建议。我的一个页面上的页脚不会停留在底部,而是覆盖了一些内容。下面是代码。如何让页脚停留在页面底部?这是页面:http://www.halfmoonbaymeetings.com/hot-dates-hot-rates/
<?php
/*
Template Name: Hot Dates Hot Rates
*/
?>
<?php get_header(); ?>
<div class="col7 equalheight" id="content">
<?php $my_query = new WP_Query('page_id=76'); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID; ?>
<h1 class="title"><?php the_title(); ?></h1>
<?php $subtitle = get_post_meta($post->ID, 'subtitle', TRUE); if($subtitle != '') { ?>
<p class="subtitle"><?php echo $subtitle; ?></p>
<?php } ?>
<?php the_content(); ?>
<?php endwhile; ?>
<?php $my_query = new WP_Query('showposts=1000&post_type=featured-hotels'); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID; ?>
<?php if ( get_post_meta( get_the_ID(), '_hotdates', true ) ) { ?>
<div class="col6 featuredhotel steals hotelheight">
<?php echo get_post_meta($post->ID, "_hotdates", true); ?>
</div><!-- END .col6.featuredhotel.steals -->
<?php } ?>
<?php endwhile; ?>
</div><!-- END .col8 #content -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
And here is the footer code from the Stylesheet:
.footerwrap {
background: #F9F9F9;
float: left;
margin: 0;
padding: 0;
position: relative;
width: 100%;
}
.footerwrap .col12 { text-align: center; }
.footerwidgets {
background: #eee;
border-top: 5px solid #e0e0e0;
float: left;
margin: 0;
padding: 20px 0 0 0;
position: relative;
width: 100%;
答案 0 :(得分:0)
您需要将margin-bottom: 289px;
添加到.contentwrap div,因为页脚高度为289px,因此您需要在.contentwrap div的底部添加289px来抵消它。
.contentwrap
{
float: left;
margin: 0;
padding: 0;
position: relative;
width: 100%;
margin-bottom: 289px;
}