Docs/CSS/Position

CSS Position

  • static — default, mengikuti alur normal
  • relative — relatif dari posisi normal (bisa geser pakai top/left/right/bottom)
  • absolute — relatif dari parent yang memiliki position (non-static)
  • fixed — relatif dari viewport (tetap saat scroll)
  • sticky — normal → fixed saat scroll melewati threshold
style.css
Try It →
.pos-box {
  padding:12px;
  border-radius:8px;
  font-weight:bold;
  font-size:13px;
  text-align:center;
}