0

I have this css-grid example...

.toolbar {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  background: purple;
}

.tb-left {
  justify-self: start;
  background: green;
}

.tb-right {
  justify-self: end;
  background: yellow;
}
<div class="toolbar">
  <div class="tb-left">TB left</div>
  <div class="tb-right">TB Right</div>
</div>

.tb-left and .th-right are not at the same row level.

How can I made them both be at the same level?

Daweed
  • 1,419
  • 1
  • 9
  • 24
teumec
  • 65
  • 1
  • 6

1 Answers1

1

Here you go

.toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
  background: purple;
}

.tb-left {
  justify-self: start;
  background: green;
}

.tb-right {
  justify-self: end;
  background: yellow;
}
<div class="toolbar">
  <div class="tb-left">TB left</div>
  <div class="tb-right">TB Right</div>
</div>
Aleksandar
  • 460
  • 3
  • 13