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
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "changing Alignment of Watch "changing Alignment of New topic

changing Alignment of 'Text' component

stago pat

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'.
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

Joined: Nov 08, 2001
Posts: 15385
You are wanting to change the text alignment in the text box?/
If so then it is CSS
with JavaScript it probably is = "right";
I agree. Here's the link:
subject: changing Alignment of 'Text' component
It's not a secret anymore!