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

CSS Static Positioning (position: static) — ডিফল্ট পজিশনিং

position: static হলো সব এলিমেন্টের ডিফল্ট পজিশনিং মোড। এই মোডে এলিমেন্ট নরমাল ডকুমেন্ট ফ্লোতে থাকে এবং top, bottom, left, right, z-index প্রোপার্টিগুলো কাজ করে না।

উদাহরণ

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

ব্যবহার: সাধারণত এক্সপ্লিসিটলি লিখতে হয় না, কারণ এটি ডিফল্ট। কিন্তু অন্য পজিশনিং ওভাররাইড করতে বা স্পষ্টতা জন্য লিখা যেতে পারে।

  1. CSS পজিশনিং মেথডসমূহ বোঝা

  2. CSS Absolute Positioning (position: absolute) — নিকটতম পজিশन्ड এনসেস্টারের সাপেক্ষে অবস্থান

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

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