Formatting is lost after publishing the content
Is it possible your input format is a "filtered HTML"? If I'm not in wrong it removes a lot of attributes: try to change it to "Full HTML" and verify the behaviour...