compute width and height with css