CSS দিয়ে এলিমেন্ট ভার্টিক্যালি সেন্টার করতে টপ এবং বটম প্যাডিং ব্যবহার করুন।
উদাহরণ
নিচের কোড রান করে এলিমেন্ট সেন্টার করুন।
<!DOCTYPE html> <html> <head> <style> .center { padding: 50px 0; border: 2px solid blue; } </style> </head> <body> <h2>Center Vertically</h2> <p>In this example, we use the padding property to center the div element vertically:</p> <div class = "center"> <p>I am vertically centered.</p> </div> </body> </html>আউটপুট
