diff --git a/src/index.js b/src/index.js index 200a765..fdb11cd 100644 --- a/src/index.js +++ b/src/index.js @@ -141,6 +141,10 @@ class MagicGrid { let left = col.index * colWidth + wSpace + "px"; let top = col.height + topGutter + "px"; + if (!item.style.position || item.style.position !== 'absolute') { + item.style.position === 'absolute'; + } + if(this.useTransform){ item.style.transform = `translate(${left}, ${top})`; }