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

CSS-এ margin-top property ব্যবহার

margin-top property এলিমেন্টের উপরের মার্জিন নির্দিষ্ট করে। মান লেংথ, পারসেন্টেজ বা auto হতে পারে।

উদাহরণ

নিচের কোডটি রান করে উপরের মার্জিন সেট করার পদ্ধতি শিখুন:

<html>
  <head>
  </head>
  <body>
    <p style="margin-top: 10px; border:2px solid red;">
      This is a paragraph with a specified top margin </p>
    <p style="margin-top: 10%; border:2px solid green;">
      This is another paragraph with a specified top margin in percent </p>
  </body>
</html>

মার্জিন কলাপ্স (Margin Collapse): সংলগ্ন এলিমেন্টের ভার্টিক্যাল মার্জিন (top/bottom) একত্রিত হয়ে বড়টি মানটি প্রয়োগ হয়। এটি বোঝা লেআউট ডিবাগিং-এ গুরুত্বপূর্ণ।

  1. CSS transform-style প্রোপার্টির ব্যবহার

  2. CSS transform-origin প্রোপার্টির ব্যবহার

  3. CSS transform প্রপার্টির ব্যবহার

  4. CSS top প্রপার্টি অ্যানিমেশন সহ