Text alignment from JavaScript