0

What is the best practice regarding the following issue: Given a block that implements css grid ("grid" class), that has a 10-columns wide nested block ("block" class). The nested block contains nested elements ("element" class).

How can I position the elements inside the nested block to be aligned according to the columns defined by the grid block?

<div className="grid">
  <div className="block block--span-10">
    <div className="element" />
    <div className="element" />
    <div className="element" />
  </div>
</div>
Alex Lipnik
  • 163
  • 1
  • 5
  • Sounds like it could be a job for __subgrid__ ( https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout/Subgrid ) but it's still in the working draft stage, and is not supported yet. – robertpauldev Aug 22 '19 at 08:04
  • 1
    Note that `subgrid` **is** supported by Firefox Nightly...if you want to test. – Paulie_D Aug 22 '19 at 12:26
  • 2
    https://stackoverflow.com/questions/56711501/align-child-elements-of-different-blocks – Paulie_D Aug 22 '19 at 12:27

0 Answers0