position: fixed का उपयोग
position: fixed एलिमेंट को व्यूपोर्ट (ब्राउज़र विंडो) के सापेक्ष पोजिशन करता है। यह स्क्रॉल होने पर भी अपनी जगह पर स्थिर रहता है। इसे top, right, bottom, left से पोजिशन किया जाता है।
उदाहरण: बॉटम-राइट फिक्स्ड बॉक्स
<!DOCTYPE html>
<html>
<head>
<style>
div {
position: fixed;
bottom: 0;
right: 0;
width: 200px;
border: 3px solid blue;
}
</style>
</head>
<body>
<h2>position: fixed;</h2>
<p>The position: fixed; property allows you to position element relative to the viewport.</p>
<div>
div has position: fixed;
</div>
</body>
</html>
सामान्य उपयोग: स्टिकी नेवबार, चैट विजेट्स, "टॉप पर वापस जाएं" बटन, मॉडल डायलॉग्स।