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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:17:48+00:00 2026-06-12T11:17:48+00:00

I have a list of form elements. Labels go next to each element. Some

  • 0

I have a list of form elements. Labels go next to each element. Some labels, some have text. They are behaving differently in different browsers.

Essentially what’s happening is that the labels which have text are creating whitespace above the list items. The form is much more complex than this, but I’ve boiled it down to this basic code: http://jsfiddle.net/uZ2Et/

#cleanVersion li {
    display: inline-block;
    border: 1px solid gray;
    height: 200px;
    margin: 0;
    padding: 0;
}
#cleanVersion label {
    display: inline-block;
    font-size: 70px;
    background-color: blue;
    border: 0;
    margin: 0;
    padding: 0;
    width: 200px;
    height: 150px;
}
​

<div id="cleanVersion">
    <ul>
        <li><label>test</label></li>
        <li><label></label></li>
    </ul>
</div>​

I’ve tried adjusting the margins, borders, padding, line-height… but still the labels remain inconsistent.

How do I get rid of the whitespace which appears above the list items with text in them?

Edit: Here’s a more complex example which is closer to what I’m actually doing: http://jsfiddle.net/uZ2Et/6/

  • 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-12T11:17:49+00:00Added an answer on June 12, 2026 at 11:17 am

    Use vertical-align: top; on the list items: http://jsfiddle.net/uZ2Et/1/

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

Sidebar

Related Questions

I have to create a name-value list in HTML. (Actually they are form elements,
I have an unordered list of form elements with ids <ul class=sortable id=userForm> <li
So I have this form (some elements removed for clarity) <form id={{ section }}-submission-form{{
I have an element (a comments list and form) that is used in many
I have created a list form that gets attached to a main form in
I have list of input area in the form with id like contact1_title, contact2_title,
I have nested list of the following form: my_list = [['Some1', '2', '3.6', '4.5',
I have a list of data of the form: [line1,a] [line2,c] [line3,b] I want
I have a list within Sharepoint, using a custom new form I have added
Hello i have a list view control, While the form is being loaded i

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.