javascript and styling works perfectly