position: fixed;

position: fixed;

div.fixed {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 300px;
  border: 3px solid #73AD21;
}
  • An element with position: relative; is positioned relative to the viewport, which means it always stays in the same place even if the page is scrolled.
  • The top, right, bottom, and left properties are used to position the element.
  • A fixed element does not leave a gap in the page where it would normally have been located.

Related concepts

position: fixed; — Structure map

Clickable & Draggable!

position: fixed; — Related pages: