CSS Grid System

A good example of a css grid is www.simplegrid.io

Here is a js script for figuring out our column percentages

let widthWithMargin     = 100 / 12
let widthWithoutMargin  = 100 / 12 - 2

[0,1,2,3,4,5,6,7,8,9,10,11].forEach(i => {
    let result = (widthWithMargin * i) + widthWithoutMargin;
    console.log(`column ${i + 1} should be ${result}`)
})

results matching ""

    No results matching ""