More grid work

This commit is contained in:
Jeremy Thomas
2018-02-13 09:38:04 +00:00
parent 6d9005ad2a
commit fddb98d732
5 changed files with 58 additions and 13 deletions

View File

@@ -5,7 +5,8 @@ document.addEventListener('DOMContentLoaded', () => {
$cells.forEach(el => {
const parentWidth = el.parentElement.offsetWidth;
const percentage = el.offsetWidth / parentWidth * 100;
el.append(`${Math.round(percentage)}`);
el.innerHTML = (`${percentage.toFixed(2)}`);
// el.append(`${Math.round(el.offsetWidth)}`);
});
// Functions