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 9073351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T18:23:50+00:00 2026-06-16T18:23:50+00:00

Order entry form is created from fields defined in database. Every field contains text

  • 0

Order entry form is created from fields defined in database.
Every field contains text caption and input element.

input element is input type=text, checkbox or select element.
If can be also jquery ui autocomplete or datepicker containing dropdown button in right side.
JQuery UI is used.

In output input elements are not aligned. It looks messy:

messy form

How to improve readability of this layout?

How to align left sides of input elements vertically so that they start at same column ?
if browser window is resized, new column should appear or removed automatically.

Maybe there is some magic css or jquery ui feature which allows this?
Also it may be possible to make all field widths the same. Minimum width of each input element
is defined in database. Rendered width can be somewhat bigger. For captions, it is possible to make two pass rendering: in first pass find maximum number of characters in caption and calclulate width for every caption.

html used is:

<form id='_form' class='form-fields'>

<div class='form-field'>
<label class='form-label' for='Klient0_nimi'><u>Customer</u></label>
<span id='span_Klient0_nimi'><input id='Klient0_nimi' name='Klient0_nimi'  style='width:100px'  class='ui-widget-content ui-corner-all' maxlength='80'  lookup='Klient' value='Brad Abrams' ></input>
<button type='button' class='form-combobutton' tabindex=-1 ></button>
</span>
</div>

<div class='form-field'>
<label class='form-label' for='Tasudok'>Number</label>
<input class='ui-widget-content ui-corner-all'  id='Tasudok' name='Tasudok' value='798'  style='width:100px'  maxlength='25' />
</div>

<div class='form-field'>
<label class='form-label' for='Kuupaev'>Date</label>
<input maxlength=10 size=10 class='ui-widget-content ui-corner-all'  id='Kuupaev' name='Kuupaev'   value='1/26/2012' />
</div>


<div class='form-field'>
<label class='form-label' for='Maksetin1_tingimus'><u >Condition</u></label>
<span><select id='Maksetin1_tingimus' name='Maksetin1_tingimus' class='ui-widget-content ui-corner-all' style='width:100px'  
 lookup='Maksetin' value='10' >

 <option value=''></option>
 <option value='10'>10 days</option>
 </select>
</span>
</div>


<div class='form-field'>
<label class='form-label' for='Eimuuda'>No change</label>
<input type='hidden' value='false' name='Eimuuda' />
<input type='checkbox' id='Eimuuda' name='Eimuuda'/>
</div>

<div class='form-field'>
<label class='form-label' for='Doksumma'>Total</label><input style='text-align:right'  id='Doksumma' name='Doksumma'  disabled='disabled' class='jqgrid-readonlycolumn' readonly='readonly' tabindex='-1'  value='0.00'  style='width:100px'  maxlength='0' />
</div>

</form>
  • 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-06-16T18:23:51+00:00Added an answer on June 16, 2026 at 6:23 pm

    You could use some column alignment: on the first columns the labels, on the second column the input fields.

    Eventually you can use 4 column: labels on 1st and 3rd, input fields on 2nd and 3rd.

    Also, use width:100% on input fields. And you may want to consider text-align:right for labels.

    The old html table may help you here.

    As you have many fields you may want to consider to split the form in sections; like using <fieldset> and <legend> as explained here

    Example:

    <!DOCTYPE html>
    <html>
    <body>
    
    <style type="text/css">
        .lbl {
            text-align: right;
            width: 100px;
            white-space: nowrap;
        }
    
        .fld {
            width: 100%;
        }
    
        .frm {
            display: inline-block;
        }
    
    </style>
    </head>
    
    <form>
        <fieldset>
            <legend>Person</legend>
    
            <div class="frm">
                <table>
                    <tr>
                        <td class="lbl"><label for="name">Name:</label></td>
                        <td><input class="fld" id="name" type="text"></td>
                    </tr>
                    <tr>
                        <td class="lbl"><label for="email">Email:</label></td>
                        <td><input class="fld" id="email" type="text"></td>
                    </tr>
                    <tr>
                        <td class="lbl"><label for="dob">Date of birth:</label></td>
                        <td><input class="fld" id="dob" type="text"></td>
                    </tr>
                </table>
            </div>
    
            <div class="frm">
                <table>
                    <tr>
                        <td class="lbl"><label for="addr">Address:</label></td>
                        <td><input class="fld" id="addr" type="text"></td>
                    </tr>
                    <tr>
                        <td class="lbl"><label for="city">City:</label></td>
                        <td><input class="fld" id="city" type="text"></td>
                    </tr>
                    <tr>
                        <td class="lbl"><label for="ctry">Country:</label></td>
                        <td><input class="fld" id="ctry" type="text"></td>
                    </tr>
                </table>
            </div>
    
        </fieldset>
    </form>
    
    </body>
    </html>
    

    This would be the results:

    when there is enough space horizontally:

    enter image description here

    when there is not enough space horizontally:

    enter image description here

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

Sidebar

Related Questions

I have an order entry form that has a ListBox with a list of
I have a form that creates a new entry into a database. One of
I have a website that grabs a random entry from a database and displays
I have created an input form for orders whereby I select an client as
I'm writing an order entry web application. I don't think it matters here, but
I'm currently developing an order entry application for my company. This means I need
I'm working on an order entry application targeted to windows mobile devices. I need
As LinkedHashMap/Set keeps the order of entry in the Collection so it leads to
Order deny,allow deny from all allow from xx.xx.x.xx RewriteRule . - [F] I have
in order to recover data from server I use XMLHttpRequest and my code is

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.