Fix ie7 error caused by style.font property and improve code style.

Fix code style as like same with other code.