reset style of error message when window resize
update style