remove unneeded style, modify callback for resize