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

  • Home
  • SEARCH
  • 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 7086857
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:36:07+00:00 2026-05-28T07:36:07+00:00

I have a very simple form for data input. Just labels with inputs. But

  • 0

I have a very simple form for data input. Just labels with inputs. But my labels are localized, so I don’t know how long text for different languages will be. This problem is easily solved with table layout:

<table>
    <tr>
        <td>
            <label for="Text1">Short</label>
        </td>
        <td>
            <input id="Text1" type="text" />
        </td>
    </tr>
    <tr>
        <td>
            <label for="Text1">Looooooooong</label>
        </td>
        <td>
            <input id="Text2" type="text" />
        </td>
    </tr>
</table>

No matter how long labels are my layout will be always nice. But us many say using table tag with non tabular data is not good. I don’t now how to solve this problem with divs.

 <div>
    <div style="float:left; width:50px;"><label for="Text3">Short</label></div>
    <div style="float:left;"><input id="Text3" type="text" /></div>
    <br style="clear:left;" />
</div> 
<div>
    <div style="float:left; width:50px;"><label for="Text4">Looooooooong</label></div>
    <div style="float:left;"><input id="Text4" type="text" /></div>
    <br style="clear:left;" />
</div>

With this solution I need to use fixed size divs. Of cource I can set some big value for label divs width, but I want that my UI takes as much space as needed.
Any ideas?

  • 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-28T07:36:07+00:00Added an answer on May 28, 2026 at 7:36 am

    The only way to really get a nice, adjustable layout similar to the one you get with an HTML table (which is semantically correct here, should someone care about this) is to use table layout in CSS, i.e. to use display: table, display: table-row, etc. It’s probably obvious how to do that. But it will have more limited browser support than an HTML table.

    Any other approach has some rigidity where a guess on the widths of labels or the entire… construct has to be made.

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

Sidebar

Related Questions

Imagine this simple form for uploading a file: <form action=upload enctype=multipart/form-data> <input type=text name=name/>
I have a very simple voting form. It contains a single text field for
Ok, so I have a very simple form with next to no logic in
I have a very simple entry form. After a button is pressed, I need
I have a very simple XAML form, that has one namespace definition. For some
I am posting a very simple form using a method I have used frequently
I have a very simple WPF application in which I am using data binding
I have a very simple table in access. The data is stored from VB.NET
I have very simple form along with two database tables. In this form is
I need to create a very simple application: I need to have a form

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.