I'm trying to make a chessboard with a single element. It is located within a container. I want it so that when the page is resized, the width and height are both divisible by 8.
So I was thinking, you get an eighth of the width (12.5%), round down to the nearest pixel, then multiply by 8 again. Is this possible?
So far I have:
@eighth: 12.5%;
@rounded: floor(@eighth);
@multiplied: @rounded * 8;
But this is giving a result in percent (96%), rather than in pixels. Can I convert from percent to pixels first?