skip to Main Content

How to create an arbitrary sized matrix in css grid

I want to create an arbitrary n x n matrix using CSS Grid. My HTML structure is: <div class="matrix"> <div class="matrix-corner"></div> <div class="matrix-header-row">Header1</div> <div class="matrix-header-row">Header2</div> <div class="matrix-header-col">Header1</div> <div class="matrix-header-col">Header2</div> <div class="matrix-row"> <div class="matrix-cell">100%</div> <div class="matrix-cell">50%</div> </div> <div class="matrix-row"> <div class="matrix-cell">50%</div>…

VIEW QUESTION

Reordering columns in CSS grid

I have the following HTML: <ul> <li> <p>A</p> <p>B</p> <p>C</p <p>D</p> </li> <li> <p>AAA</p> <p>BBB</p> <p>CCC</p <p>DDD</p> </li> <li> <p>A</p> <p>B</p> <p>C</p <p>D</p> </li> <li> <p>AAAAAA</p> <p>BBBBBB</p> <p>CCCCCC</p <p>DDDDDD</p> </li> </ul> The actual number of lis is variable, but each…

VIEW QUESTION
Back To Top
Search