Home > Blockchain >  Position of Back button always right and down of a page
Position of Back button always right and down of a page

Time:11-26

Is there a way to position a button in html/css in order to always have the button in the most right and down corner of a page? I have to mention that the table that exists in the page is going to have more rows, because of that: If the user adds a record, the record would be displayed in the view.

What I have already tried and it is working is to make a div for the button 'Back':

button[name=BackBtn] {
  color: white;
  padding: 8px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: inline-block;
}
<div class="Back">
  <button name="BackBtn" type="button" style="font-size: 16px; float: right; border-radius: 8px;  background-color: #3869d4;" onclick="history.back()">Πίσω</button>
</div>
<iframe name="sif1" sandbox="allow-forms allow-modals allow-scripts" frameborder="0"></iframe>

Page example

CodePudding user response:

If you want to scroll and having the button always in that position with respect to the viewport, you have to use position:fixed, in this way everywhere you are in the page you will see the button always in the same place. If you want instead to have it always in the right bottom corner fixed in the page and not in the viewport (if you scroll up maybe you cannot see it), you can use position right and bottom in pixels.

  • Related