Added css and javascript that determines width of boxes