struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurie Harper <lau...@holoweb.net>
Subject Re: [Struts2] How to right align the label for a text field?
Date Mon, 16 Apr 2007 06:40:22 GMT
Neil Aggarwal wrote:
> Hello:
> 
> I am sure this has been asked before, but I am just
> not finding the answer.  I have searched the web
> and the archives of this list to no avail.
> 
> I want to make some labels of an input form align
> to the right instead of the left.
> 
> Here is an example:
> 
> <s:form action="test/ThemeTest">
> 	<s:textfield label="Improvement value" name="impMinVal" size="8"/>
> 	<s:textfield label="to" name="impMaxVal" size="8"/>
> 	<s:textfield label="Short" name="impMinVal" size="2"/>
> 	<s:textfield label="to" name="impMaxVal" size="8"/>
> </s:form>
> 
> Here is what the page looks like:
> https://tweb.retcgroup.com/thymeleweb/test/ThemeTest.action
> 
> I want the label Short: to appear to the right of its table
> cell instead of the left.

Two options:

1) simply define a CSS rule to set the text alignment as you want

2) customize the theme to include appropriate inline-CSS or an 
align='right' on the <td> for the label.

More info on modifying themes and templates is here:


http://struts.apache.org/2.x/docs/themes-and-templates.html

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message