How to add fixed button to the bottom right corner of html page using css

If you want to add a specific button for example, for uploading some contents to your website OR for moving to top if user has scrolled down on the page, the best way is to add a static/fixed button on the bottom of the page, you can decide whether you want to add on right corner or left corner based on the design of your website.

Here, we will show how to add the button on lower right corner of html page using simple html code as below,

<a href="https://www.your_website.com" style="position:fixed;bottom:10%;right:5px;margin:0;padding:5px 3px;">
    <button type="button" class="btn btn-danger btn-sm">
      <span class="glyphicon glyphicon-plus"></span>
      <b> FREE POST </b>
    </button>
</a>

Preferrably add this code to the footer of your website, so the button is visible on all pages of website. The live functional button with css used as above can be seen at this website

Here we have used, button from bootstrap and class set to “btn-danger” for red background button. We also have shown the plus ( + ) icon using glaphicon library, and actual css looks like as below,

position:fixed;
bottom:10%;
right:5px;
margin:0;
padding:5px 3px;
Follow Lynxbee

Leave a Reply / Ask Question