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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:19:46+00:00 2026-05-30T14:19:46+00:00

I am trying to make this for accessable for all browsers. Different browsers are

  • 0

I am trying to make this for accessable for all browsers. Different browsers are giving different results (with IE the most problematic for me). I included screenshots so that you can see what I am talking about.

This is how the form looks in Safari, Firefox and Chrome:

enter image description here

http://imageshack.us/photo/my-images/210/bildschirmfoto20120226u.png/

This is how the form looks in IE6 and IE7:

enter image description here

http://imageshack.us/photo/my-images/37/bildschirmfoto20120226u.png/

And this is IE8 and IE9:

enter image description here

http://imageshack.us/photo/my-images/39/bildschirmfoto20120226u.png/

HTML

<form method="post" action="?test" id="form">
    <label for="user">USERNAME</label>
    <input type="text" name="user" id="user" maxlength="100" title="Please enter your username." data-h5-errorid="empty-user" tabindex="1" required />
    <div id="empty-user" class="fail">This stuff will get replaced by the title contents.</div>
    <label for="password" class="clear">PASSWORD</label>
    <input type="password" name="password" id="password" maxlength="100" title="Please enter your password." data-h5-errorid="empty-password" tabindex="2" required />
    <div id="empty-password" class="fail">This stuff will get replaced by the title contents.</div>
</form>

CSS

label {
    background: yellow;
    font-size: 12px;
    font-weight: bold;
    width: 100px;
    float: left;
    margin-right: 50px;
    text-align: right;
    cursor: pointer;
}

input {
    height: 30px;
    background-color: #fafafa; 
    border: 1px solid #abaaaa;
    width: 300px;
    margin: 5px 0 5px 0;
    float: right;
}

Now my question is, how can I align the labels so they are vertically aligned with the input fields? I’ve used the search here and most of the time something like

vertical-align: middle;

is recommended, but this isn’t working at all. The only fix for Safari, Chrome and Firefox is adding a margin-top or padding-top to the labels, but this destroys the form in IE8 and IE9.

What can I do about this issue? Dropping the height on the input field is not an option for me.

  • 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-30T14:19:47+00:00Added an answer on May 30, 2026 at 2:19 pm

    put a clear:both after the input tag (somewhere).

    I would suggest you add more markup to your forms for extra customization. Typically I like to do forms like this:

    <div class="field">
        <label for="user">USERNAME</label>
        <div class="field-subject">
            <input type="text" name="user" id="user" maxlength="100" title="Please enter your username." data-h5-errorid="empty-user" tabindex="1" required />
        </div>
    </div>
    
    .field { 
        overflow: auto; /* this "clears" the floated elements */
        margin-bottom: 10px;
    }
    
    .field label {
        float: left;
        width: 200px;
    }
    
    .field .field-subject {
        float: left;
        width: 500px;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to make this to be a little jQuery plugin that
I am trying to make this landscape only iphone app. I only use this
I'm trying to make this fragment work: Version History --------------- These are the versions
I'm trying to make this code generic: public final Object unwrap(Class arg0) { throw
I'm trying to make this command: sed bla bla filename | awk '{printf %s
$('#div1').focus(function () { callAnotherFunction(); $(this).animate({}); } I'm trying to make $(this).animate({}); execute after callAnotherFunction();
I'm trying to make a python binding for the this library: http://code.google.com/p/hosterslib/ . I'm
I am trying to make two ajax requests in parallel using jQuery like this:
I am currently trying to make a sectioned table like this: Section 1: Entry
im trying to make Categories and Subcategories, im checking this models but i have

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.