justify-content: space-between মান ফ্লেক্স আইটেমগুলোর মধ্যে সমান স্পেস বণ্টন করে, প্রথম আইটেমকে শুরুর ধারে এবং শেষ আইটেমকে শেষের ধারে রাখে।
উদাহরণ
নিচের কোডটি চালিয়ে space-between মান ব্যবহার দেখুন:
<!DOCTYPE html> <html>
<head>
<style>
.mycontainer {
display: flex;
background-color: red;
justify-content: space-between;
}
.mycontainer > div {
background-color: orange;
text-align: center;
line-height: 60px;
font-size: 30px;
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>
</body>
</html>
ব্যাখ্যা: justify-content: space-between মেইন অক্ষের দিয়ে প্রথম আইটেম বামে, শেষ আইটেম ডানে এবং বাকিগুলোর মাঝপথে সমান স্পেস বণ্টন করে। এটি নেভিগেশন বারের জন্য খুব উপযোগী।