I\'d like to have the html below showing in n equal columns whether there are two, or three, or more child elements to the row element using css grid - Flexbox makes this ea
Here is simple answer(at least in my perspective). I got this issue above answers not helped me. Here the code to divide 'div' into equal width and with required number of columns.
//CSS
.grid-container {
display: grid;
grid-template-columns: auto auto auto; // no of 'auto's will be number of columns here it's 3
}
//HTML
more info on grid can be seen here W3Schools