added events to get the buttons width, added border to buttons