I want to display three lines of text in a Javascript alert box with center alignment of text.
I’m using the following code for that,
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’s working fine with Firefox. But in chrome, the tab (\t) character is not working. Texts are left aligned in all lines. Please help.
Seems to have been an issue for awhile sadly 🙁
http://productforums.google.com/forum/#!topic/chrome/bfmvqAvtSd4
Found that and it makes it out to look like it’s not possible.
Perhaps use something that’d mimic an alert box in appearance?