Having some trouble with my sticky footer - despite checking out various resources and examples, I can't seem to achieve the desired outcome.
Update: I don't want the footer to be fixed. I want it to stay at the bottom of the screen if there isn't enough content to push it down, but to move down if necessary.
For my complete CSS code, visit:
Key CSS code:
html,
body {
height: 100%;
}
.wrap {
min-height: 100%;
height: auto;
margin: 0 auto -42px;
padding: 0 0 42px;
}
footer {
height: 42px;
}
Relevant HTML:
<?php get_header(); ?>
<div class="row wrap">
<div class="col-sm-12 blog-main">
<?php
if ( have_posts() ) : while ( have_posts() ) : the_post();
get_template_part( 'content', get_post_format() );
endwhile; endif;
?>
</div> <!-- /.blog-main -->
<?php get_sidebar(); ?>
</div> <!-- /.row -->
<?php get_footer(); ?>
View this layout at