File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Struts 2 - Align input buttons Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 - Align input buttons" Watch "Struts 2 - Align input buttons" New topic

Struts 2 - Align input buttons

Charles Z Martin

Joined: Jun 26, 2008
Posts: 9

I am encountering a problem I am pretty sure a few people have dealt with before.

I am trying to align submit buttons in a form. I somewhat understand that they do not align due to the default theme, but don't really know how to create my own theme or fix this problem.

Any help on how to fix this problem would be helpful.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
If you specify theme="simple" either at the submit button level or at the form level, this tells Struts not to put any <td> tags around the input field. That leaves you free to format it however you want.

Consultant, Sima Solutions
Charles Z Martin

Joined: Jun 26, 2008
Posts: 9
I was afraid of using the simple theme as I thought I would lose some functionality.

Shows what I know, it worked perfectly. Thanks!
I agree. Here's the link:
subject: Struts 2 - Align input buttons
jQuery in Action, 3rd edition