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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:18:00+00:00 2026-05-10T21:18:00+00:00

[Meta-note:] I was browsing the question page, getting really tired of DIVS vs Tables

  • 0

[Meta-note:] I was browsing the question page, getting really tired of ‘DIVS vs Tables’ ‘When to use tables vs DIVS’ ‘Are Divs better than Tables’ ‘Tables versus CSS’ and all the questions that ask THE SAME THING OMG PEOPLE but I would like to see all the ways people tackle the translation of the canonical example of ‘why you should give up and use tables’:

<table>   <tr>     <td> Name </td>     <td> <input> </td>   </tr>   <tr>     <td> Social Security Number </td>     <td> <input> </td>   </tr> </table> 

Question: How to best (semantically, simply, robustly, fluidly, portably) implement the above without tables. For starters, I guess a naive implementation uses a fixed column width for the first column, but that can have iffy results for dynamically generated content. Including strengths/weaknesses of your approach in the answer would be nice.

P.S. Another one I wonder about a lot is vertical centering but the hack for that is covered pretty well at jakpsatweb.cz

EDIT: scunlife brings up a good example of why I didn’t think out the problem that carefully. Tables can align multiple columns simultaneously. The Question still stands (I’d like to see different CSS techniques used for alignment/layout) – although solutions that can handle his? more involved example definitely are preferred.

  • 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. 2026-05-10T21:18:00+00:00Added an answer on May 10, 2026 at 9:18 pm

    What I usually do is :

    <form>  <label for='param_1'>Param 1</label>  <input id='param_1' name='param_1'><br />  <label for='param_2'>Param 2</label>  <input id='param_2' name='param_2'><br /> </form> 

    and in a CSS :

    label,input { display: block; float: left; margin-bottom: 1ex; } input { width: 20em; } label { text-align: right; width: 15em; padding-right: 2em; } br { clear: left; } 

    Of course, you’ll have to define the width according to your actual data 🙂

    • First, give label and input display: block, so that it can be assigned a size and be lined up.
    • They both get float: left because Explorer does things a bit differently
    • Format the label nicely
    • hack the br so that there’s a clear: left somewhere, and I remember that putting it on the label didn’t work on some browser.

    Plus, with the br you get a nice formatting even if the browser does not support CSS 🙂

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

Sidebar

Related Questions

note: question title is change as discussed in this meta Q&A I'm using the
I have added meta tag description in my page, but it is not displaying
In my experience Meta-templates are really fun (when your compilers are compliant), and can
Page A has a meta refresh to redirect to another page, C , after
Is there CSS Meta Framefork for ASP.NET? Something like LESS or xCSS.
[Note: This question had the original title " C (ish) style union in C#
Can someone identify ONE WEB PAGE where <meta property=og:audio:artist> and <meta property=og:audio:album> are actually
Meta note: it is impossible to search for the word this. I've just run
Note: I'm using jQuery and jQuery Mobile. I have a mobile page which seems
In this answer to a Meta question , Jeff states that he has fixed

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.