Javascript and CSS sometimes suck so badly