Wordpress:修复页脚

I am actually working on this Wordpress website and i am trying to fix the footer via code (because via theme options is not possible with this template).

This is the footer.php code

<!-- Footer -->
    <footer>
    <div class="container-fluid">
    <div class="row padding-bottom48">
    <div class="col-md-12 text-center padding-top48 text-footer">

    <?php sierra_opt_footer_text(); ?>
    <?php sierra_opt_footer_social_icons(); ?>

    <div class="text-center padding-top72">
    <a href="#" class="scroll-to relative">
    <p class="sierra-arrow-up"></p>
    </a>
    </div>
    </div>
    </div>
    </div>
    </footer>
 <!-- end footer -->

I tried in the easy way:

footer { position: fixed; )

Without nice results.

How can i make the footer sticky and fixed?

Thanks in advice.

Try this code

footer { 
  bottom: 0;
  position: fixed;
  width: 100%;
}

And add height as per your requirement

This should do the trick (adapted from CSS-Tricks). You should change page-wrap to your theme "page wrapper" class or add one if missing.

* {
  margin: 0;
}
html, body {
  height: 100%;
}
.page-wrap {
  min-height: 100%;
  /* equal to footer height */
  margin-bottom: -142px; 
}
.page-wrap:after {
  content: "";
  display: block;
}
footer, .page-wrap:after {
  height: 142px; 
}

try this

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
}

Your css should be this:

.container-fluid {
  position: fixed;
  bottom: 0px;
}

I'm not sure why you want to fix your footer, though, the footer is quite large and takes up a lot of screen space from the rest of the website; the footer isn't important enough to do this with. What's your intention in this case?

</div>

Remove footer's height and add following css to it: footer{ position: fixed; bottom: 0; width: 100%; }