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




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>



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


Write Answer











©2024 concretepage.com | Privacy Policy | Contact Us