css style change and error handling