I want to display three lines of text in a Javascript warning window with the text aligned to the center.
I use the following code for this
alert( '\t\t\t\t'+"Congratulations!" + '\n\t' + "You are now subscribed with test.com!" + '\n' + "Keep on eye out on your inbox for future updates from us!" );
It works great with Firefox. But in chrome, the tab character ( \t
) does not work. Texts are left-aligned in all lines. Please help.
source share