Javascript Reference
Categories: STYLE

javascript STYLE textAlign

@March 15, 2008, 1:22 a.m.
textAlignFirefox/Netscape/NN 6 IE 4 Chrome/Safari/DOM 2  

Read/Write  

Determines the horizontal alignment of text within an element's box.

 
Example
 
document.getElementById("myDIV").style.textAlign = "right";
 
Value

One of the four constants (as a string): center | justify | left | right.

 
Default

Depends on default language of the browser.


Powered by Linode.