adjust display width and height