Search code examples
htmlcssuser-interfacewebflexbox

Which technique would be better flexbox or grid or something else, i am trying to create a matrix of fixed size but responsive?


I am trying to create a matrix whose row and column size would remain fixed in casse of window resizing. Which technique would be best to create such a matrix using react?

I have previously tried creating through flexbox using percentages but it failed to be responsive.


Solution

  • Flexbox will still be better choice. Even though the layout changes, the items will still be in same orientation and adding responsiveness using flex still makes better sense. For making responsive, use flex-basis based on the matrix rows and columns.