CSS and JS modification.

Avoids jerk after adding or removing border. Some more work needs to be
done to make it foolproof.