I am trying to use javascript to insert some center justified text at the bottom of the screen.
So far I have
var toInsert = document.createElement("div");
toInsert.innerHTML = "text to insert";
toInsert.style.position = "absolute";
toInsert.style.bottom = "0px";
this puts it at the bottom of the screen how I would like, but then when I try to use this
toInsert.style.textAlign="center";
the center alignment seems to be overridden by the "absolute" property above, and the text is left justified.
How can I both put text at the bottom of the screen, and have it centered? thanks.
ps. javascript not jquery, for use in a UIWebView on an iOS device.