জয়েন লগইন

সিএসএস justify-items

🌈সিএসএস justify-items কি?

📋সিএসএস justify-items হলো একাধিক আইটেমের ন্যায্যতা নির্দিষ্ট করার পদ্ধতি।

⚒️সিএসএস justify-items একাধিক আইটেমের ন্যায্যতা নির্দিষ্ট করতে ব্যবহৃত হয়।

সিএসএস justify-items একাধিক আইটেমের ন্যায্যতা নির্দিষ্ট করার উদাহরণ।

css
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.container {
  width: 300px;
  height: 80px;
  border: solid black 1px;
  display: grid;
  grid-template-columns: repeat(3, 80px);
  margin-bottom: 10px;
}

.container > div {
  width: 40px;
  height: 40px;
  background-color: coral;
}

.start {
  justify-items: start;
}

.end {
  justify-items: end;
}

.center {
  justify-items: center;
}

.stretch {
  justify-items: stretch;
}
</style>
</head>
<body>

<div class="container start">
  <div></div>
  <div></div>
  <div></div>
</div>

<div class="container end">
  <div></div>
  <div></div>
  <div></div>
</div>

<div class="container center">
  <div></div>
  <div></div>
  <div></div>
</div>

<div class="container stretch">
  <div></div>
  <div></div>
  <div></div>
</div>

</body>
</html>