Adjusts the css in the js function