Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6905893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T08:14:22+00:00 2026-05-27T08:14:22+00:00

I am creating a login page with the following input fields: <td> <s:textfield class=loginInput

  • 0

I am creating a login page with the following input fields:

<td>
    <s:textfield  class="loginInput" name="username" label="Username" id="un1" size="20"/>
    <s:password class="loginInput" name="password" label="Password"  id="pw1" size="20"/>
</td>

However, when I compile and run the page, the two textboxes show up with different sizes. The Username textbox is slightly bigger than the password textbox.

I tried adding the size attribute to make them display the same length. I even tried adding a CSS element to have them display the same size, still nothing. Any suggestions?

Edit: I should add that this only happens in I.E. works perfectly fine in chrome

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T08:14:23+00:00Added an answer on May 27, 2026 at 8:14 am

    Which theme you are using? Since size is a valid parameter of struts2 text-field. i suggest you to do following steps:

    Use simple theme:

       <td>
            <s:textfield theme="simple" cssClass="loginInput" name="username" 
             label="Username" id="un1" size="20"/>
            <s:password theme="simple" cssClass="loginInput" name="password"
            label="Password"  id="pw1" size="20"/>
        </td>
    

    If you have not set up a theme, Struts 2 uses the "xhtml" theme by default. This means it will create additional HTML with <td><tr> for input elements out of the box

    I hope this should work.

    FYI: I tested your code in my local machine here is the screen shot and everything is working perfectly fine

    enter image description here

    Are you sure you are using your CSS and other things correctly??

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm actually following a tutorial about creating a login page etc for a web
I'm creating a login page. I want to create ASP.NET TextBox controls that have
I am creating few pages (including login page) which should only be accessible by
I implemented Forms authentication by creating Default.aspx and custom login page named login.aspx .
I'm creating asp.net mvc login page. This is simple. Same as others. Controller contains
I'm creating a login page for users, and I have a UITextField for users
Creating a login page in xcode 4.2 I have the users fill out information
I create a login page creating at first the controller using codeigniter php and
I'm kind of new in here. I'm creating a login page in HTML with
I have created a login page for an App I am creating. I am

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.