I am trying to make a chessboard with one element. It is located inside the container. I want the width and height to be divisible by 8 when resizing the page.
So, I thought you would get the eighth width (12.5%), round to the nearest pixel, and then multiply by 8 again. Is this possible?
So far, I:
@eighth: 12.5%;
@rounded: floor(@eighth);
@multiplied: @rounded * 8;
But this gives the result in percent (96%), and not in pixels. Is it possible to convert from percent to pixels first?
source
share