CSS – place a div in bottom right corner of browser

To place a div in bottom right corner of browser or iframe, we can use position:fixed along with right and bottom property value assigned to 0.

<style type="text/css">
.bottomright {
  position: fixed;
  right: 0px; bottom: 0px;
  width: 200px;
  height:40px;
  background-color:lightblue;
  padding: 5px;
}
.large {
  width: 2000px; height: 500px;
  background-color: lightgray;
}
</style>

<div class="large">Regular text</div>
<div class="bottomright">
  Sticky fixed text - bottom right
</div>
refresh
Share this article: share on Google+ share on facebook share on linkedin tweet this submit to reddit

Comments

Click here to write/view comments