trim function and CSS changes