flex-direction: row মান ফ্লেক্স আইটেমগুলকে হরিজেন্টাল (বাম থেকে ডানে) সাজায়। এটি ডিফল্ট মান।
উদাহরণ
নিচের কোডটি চালিয়ে row মান ব্যবহার দেখুন:
<!DOCTYPE html> <html>
<head>
<style>
.mycontainer {
display: flex;
flex-direction: row;
background-color: orange;
}
.mycontainer > div {
background-color: white;
text-align: center;
line-height: 40px;
font-size: 25px;
width: 100px;
margin: 5px;
}
</style>
</head>
<body>
<h1>Quiz</h1>
<div class="mycontainer">
<div>Q1</div>
<div>Q2</div>
<div>Q3</div>
<div>Q4</div>
<div>Q5</div>
<div>Q6</div>
</div>
</body>
</html>
ব্যাখ্যা: flex-direction: row মেইন অক্ষকে হরিজেন্টাল করে দেয়, ফলে আইটেমগুলো বাম থেকে ডানে সারিয়ে থাকে। RTL (রাইট-টু-লেফ্ট) ভাষার জন্য অর্ডার উল্টা হয়।