wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes changing Alignment of 'Text' component Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "changing Alignment of Watch "changing Alignment of New topic
Author

changing Alignment of 'Text' component

stago pat
Greenhorn

Joined: Jan 21, 2004
Posts: 4
Hi -
I have a Text( InputBox) with Absolute position on the HTML page , now according to user selection I want to reposition this text with the use of Java Script.
Is this possible !! Ir yes.. then please show me the way...
In HTML code below - I want to change Top and left alignment, according to user selection with the use of Java Script.
So that the rendering page, will reposition the 'text'.
Thanks
Please find below - HTML code for this 'Text'

<input type="text" name="C2A2" title="C2A2" size="1"
style="position:absolute; top:375px; left:170px; {background-color: #ccffcc}"
onchange="checkType(this, 'double')"/>
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
You are wanting to change the text alignment in the text box?/
If so then it is CSS
style="text-align:right"
with JavaScript it probably is
document.FormName.ElementName.style.textalign = "right";
Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: changing Alignment of 'Text' component