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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T02:01:25+00:00 2026-05-17T02:01:25+00:00

Hello I am creating a simple form to enter employee information. An employee has

  • 0

Hello I am creating a simple form to enter employee information. An employee has the following characteristics:

  • First Name
  • Last Name
  • Age
  • SSN
  • Gender
  • Race
  • etc…

There are about 20 properties I want to display a label and textbox for (some have dropdowns). I don’t want to use a table because I’ve read that using <div> elements and CSS is better style so I want to take this opportunity to learn. Some of the fields are really wide (Address1, Address2) and others are very narrow (Mr./Mrs.).

Right now all label/input pairs are set up like this:

<div class="data-container">

  <div class="data-row">
    <div class="data-label>
      <!-- label -->
    </div>
    <div class="data-input>
      <!-- textbox -->
    </div>
  </div>

  <!-- many more label/input pairs here -->

  <!-- Submit --> <!-- Cancel -->


</div>

I want each ‘data-row’ to be on a separate horizontal variable-width row
At the bottom there is a Submit and a Cancel button, I want those centered and on the same row.

I tried setting this CSS

.data-row
{
  display: block;
  clear: both;
}

.data-label,
.data-input
{
  float: left;
}

But even with block display on the rows they continue to wrap around the entire container so I can’t get 3 inputs on one row, then 4 on the next, and then 3 more, and so on. How can I do this properly?

  • 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-17T02:01:26+00:00Added an answer on May 17, 2026 at 2:01 am

    try adding overflow: hidden;

    .data-row
    {
      display: block;
      clear: both;
      overflow: hidden;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm creating a very simple (hello World quality) web application using spring mvc 3.0.
Good Morning Stackoverflow-ka-teers, I am creating a raffle form that allows you to enter
Original Question: Hello, I am creating very simple hobby project - browser based multiplayer
I am creating my first, very simple RMI client-server application. Here is the code:
I'm creating a simple hello world vc++/opencv project. In my code, I want to
Hello I am creating a simple console application in vb.net in order to convert
I've created a simple webapp using Spring & Jetty, and am creating a hello
Does anyone have a hello world sample or tutorial for creating an Eclipse plugin
Hello I'm creating a game and I have a few ways to make trainers
Hello I am creating a Windows application (WPF) that is going to be running

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.