কম্পিউটার টিউটোরিয়াল

CSS রিলেটিভ পজিশনিং

রিলেটিভ পজিশনিং-এ এলিমেন্টটি তার সাধারণ অবস্থানের সাপেক্ষে পজিশন করা হয়। এর জন্য position: relative ব্যবহার করুন।

উদাহরণ

একটি উদাহরণ দেখি:

<!DOCTYPE html> <html> <head> <style> div.demo {    position: relative;    color: white;    background-color: orange;    border: 2px dashed blue;    left: 50px; } </style> </head> <body> <h2>Demo Heading</h2> <p>This is demo text.</p> <p>This is demo text.</p> <div class="demo"> position: relative; </div> <p>This is another demo text.</p> </body> </html>

আউটপুট

CSS রিলেটিভ পজিশনিং


  1. CSS রিলেটিভ পজিশনিং

  2. CSS-এ রিলেটিভ লেথ ইউনিট

  3. CSS-এ স্ট্যাটিক পজিশনিং

  4. CSS-এ Relative Positioning