gets width and height from selector