refactors css properties for a tags and img