I am looking for a way to right-justify specific columns (not all columns) in a grid in CSS without having to explicitly specify a special class or style for each column entry. For example:
<style>
.myclass {
display: grid;
grid-template-columns: 100px 100px 100px 100px;
}
</style>
<div class="myclass">
<span>AAAA</span>
<span>BBBB</span>
<span>CCCC</span>
<span>DDDD</span>
<span>EEEE</span>
<span>FFFF</span>
<span>GGGG</span>
<span>HHHH</span>
</div>
So, I want the first and third columns right justified, and the second and fourth columns left justified without having to explicitly specify style or class for each span.
Thanks!