the post didn't mention the transform: translate(x%) trick but other (even older) ways:
I usually either relied on the numbers (so defining margin or padding for the item - which is not good idea cause it looks different on different screens) or used floating. There was also a way with creating tables and putting your content there.
Frontend engineer. Enthusiast of just-in-time learning and learning by teaching as well as deep work concept. Sharing coding tips & my thoughts on dev work.
in a container with
position: relative
you can also use:But yeah, the grid solution is much better
Isn't it this mentioned "old way"?
Just out of curiosity
This is 100% the old way. Pre-flexbox that was one of the only ways to do it reasonably well.
Thanks! Thought so. So it was actually mentioned in the article, that this way using grid is the alternative to the old ways.
the post didn't mention the
transform: translate(x%)
trick but other (even older) ways:ps: I still use the
transform
trick sometimes :)I also sometimes do :) I was just wondering, thanks for claryfing :D
I don't know with trick with
transform
but as mentioned in comments, it looks like a hack before flex era :) Still, very interesting!