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

Struts2 UI Tags Not Aligned On Browser

Hakan Gercek

Joined: May 20, 2005
Posts: 2
I am new in struts2 and want to develop a program which inserts records into database. I have faced a problem while using UI Tags of struts2. Here is my code block in jsp:

In the above code block, I would like to align printerMark, markCheckbox and markTextField on the same row. On Eclipse screen, these are aligned. However, on browser, each UI component is placed on new row which can be found in the attachment.

Is there a way to align these components on the same row?

Thanks for advance.

[Download printer_question_on_javaranch.bmp] Download

David Newton

Joined: Sep 29, 2008
Posts: 12617

The default theme is "xhtml", which renders table rows around UI elements.
Ankit Garg

Joined: Aug 03, 2008
Posts: 9462

Use simple theme of Struts. The default XHTML theme adds formatting information of its own. If you set the theme property of s:form tag, then all the s:select, s:textfield and s:checkbox in the form tag will be rendered without any formatting...

[Ahh, too late ]

SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
I agree. Here's the link:
subject: Struts2 UI Tags Not Aligned On Browser
It's not a secret anymore!