Home  >  Forum  >  Struts
Post New Query

multiple text fields in same line using Struts2 without using theme=“simple”?


joined on
March 22,2013
Asked on April 02,2016
I want to design a webpage that display the user id and password in same line using struts2. How to manage it without using "theme='simple'".?

index.jsp
<s:form action="Register.action">

        <s:textfield name="uid" label="User Name"/>
        <s:password name="pass" label="Password"/>
    </s:form>

Source code of the above

<!DOCTYPE html>
<html>
    <head>      
    </head>
    <body>
    <form id="Register" action="Register.action" method="post">
        <table class="wwFormTable">
            <tr>
                <td class="tdLabel">
                    <label for="Register_uid" class="label">User Name:</label>
                </td>
                <td>
                    <input type="text" name="uid" value="" id="Register_uid"/>
                </td>
            </tr>
            <tr>
                <td class="tdLabel">
                    <label for="Register_pass" class="label">Password:</label>
                </td>
                <td>
                    <input type="password" name="pass" id="Register_pass"/>
                </td>
            </tr>
        </table>
    </form>   
    </body>
</html>
joined on
February 03,2015
Replied on April 02,2016

Based on your generated source code you can apply the CSS.
.wwFormTable tr {
                display: inline-block;
            }

Write Answer




Copyright ©2017 concretepage.com, all rights reserved |Privacy Policy | Contact Us