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

The Archive Base Latest Questions

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

Given an html form like this: <form action=’/example/’ id=’example_form’ method=’POST’ name=’example_form’> <fieldset> <legend>Example form</legend>

  • 0

Given an html form like this:

<form action='/example/' id='example_form' method='POST' name='example_form'>
  <fieldset>
    <legend>Example form</legend>
    <label for='age'>
      Age
      <input id='age' name='age' tabindex='1' type='text' />
    </label>
    <label for='gender'>
      Gender
      <select id='gender' name='gender' tabindex='2'>
        <option disabled='disabled' id='gender' name='gender' value=''>Choose one:</option>
        <option id='gender_female' name='gender' value='female'>Female</option>
        <option id='gender_male' name='gender' value='male'>Male</option>
      </select>
    </label>
    <label for='height'>
      Height
      <input id='height' name='height' size='3' tabindex='3' type='text' />
    </label>
    <label for='weight'>
      Weight
      <input id='weight' name='weight' size='4' tabindex='4' type='text' />
    </label>
    <input id='Save' tabindex='5' type='submit' value='Save' />
  </fieldset>
</form> 

How would you style it to get the classic table based layout of label to the left, field to the right, everything aligned vertically? Tables are obviously out of the question. I can’t find anything on how to do this with implicit labels and just CSS.

If the answer is to not wrap the fields then so be it, but I’d prefer if a solution could be found for this as:

  1. This is generated html.
  2. I keep reading about how using implicit labels improves accessibility.

Any help/pointers/insight will be much appreciated.

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

    Here are some basic stylings to get started

    example jsfiddle

    fieldset {width:300px;}
    label {display:block;overflow:hidden;line-height:30px;}
    label input, label select {float:right;}
    input[type=submit] {float:right;width:100px;border:solid 1px;}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Given HTML like this: <body> <form name=myForm action=savedata.php method=post> <input type=text name=myName /> </form>
My HTML form is something like as follows <form id=form1 name=form1 method=post action=> number:
I've got a form: <form action=# method=post id=hubForm> <label class=labelText>Expiration Date:</label> <input class=datBox type=text
Given the following HTML form: <form id=myform> Company: <input type=text name=Company value=ACME, INC./> First
Given this HTML: <form id=formx> <input type=text value= /> </form> And this JavaScript: $(function()
In django, I can render a html template from a view action like this:
I have this code in my JSP: <%@taglib uri=http://struts.apache.org/tags-html prefix=html%> .. .. <html:form action=update
Basically, I would like to decode a given HTML document, and replace all special
Given this HTML: <ul id=topnav> <li id=topnav_galleries><a href=#>Galleries</a></li> <li id=topnav_information><a href=#>Information</a></li> </ul> And this
I have a html form with action attribute pointing to struts action Here 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.