right প্রপার্টি একটি পজিশन्ड এলিমেন্টের হরিজন্টাল অবস্থান নির্ধারণ করে। এটি position প্রপার্টি (relative, absolute, fixed, sticky) সেট থাকলে কাজ করে।
right: auto | length | initial | inherit;
উদাহরণ ১: absolute পজিশনে right: 90px
<!DOCTYPE html> <html> <head> <style> div { text-align: justify; text-justify: inter-word; color: white; background-color: orange; position: absolute; right: 90px; } </style> </head> <body> <h2>Demo Heading</h2> <div>This is demo text... </div> </body> </html>
আউটপুট

উদাহরণ ২: relative পজিশনে right: 0
<!DOCTYPE html> <html> <head> <style> .demo { background-color: orange; width: 100px; position: relative; right: 0px; color: white; } </style> </head> <body> <h1>Details</h1> <div class="demo">Examination Center near ABC College.</div> <div class="demo2">Exam begins at 11AM.</div> </body> </html>
আউটপুট

উদাহরণ ৩: নেগেটিভ মান (right: -100px)
<!DOCTYPE html> <html> <head> <style> .demo { background-color: orange; width: 100px; position: relative; right: -100px; color: white; } </style> </head> <body> <h1>Details</h1> <div class="demo">Examination Center near ABC College.</div> <div class="demo2">Exam begins at 11AM.</div> </body> </html>
আউটপুট

মহত্বপূর্ণ নোট
rightশুধুposition: staticছাড়া অন্য যেকোনো পজিশনিং-এ কাজ করেabsoluteএলিমেন্টের জন্য: নিকটতম পজিশन्ड পূর্বপুরুষের ডান প্রান্ত থেকে দূরত্বrelativeএলিমেন্টের জন্য: নিজস্ব স্বাভাবিক অবস্থানের ডান দিক থেকে বামে সরানো- নেগেটিভ মান দিলে এলিমেন্ট ডান দিকের বাইরে চলে যায়