New to LESS, I'm trying to center a div using the following:
#form_block { display: block; position: absolute; @width: 800px; @height: 500px; width: @width; height: @height; top: 50%; left: 50%; margin-left: -@width/2 px; margin-top: -250px;
It seems that margin-top set correctly, as the sizes are explicitly specified. But I can not perceive the negative of the variable no matter how hard I try (i.e. - (@width), -1 * @width, etc.). Any ideas? It could just be a stupid mistake.
css less
zhuyxn
source share