Fix null style bug when no existing inline style.

Also, changed CSS attr to change on foreground elements. This should be
a parameter in the future.