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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:19:54+00:00 2026-06-15T16:19:54+00:00

I have a html5 form which displays as expected in IE8 and above, also

  • 0

I have a html5 form which displays as expected in IE8 and above, also in Chrome, Safari, Forefox and Opera. But in IE7 the label alignment is completely different – the labels are displayed above the input fields rather than to the left of them and horizontally aligned which is what I’m after.

I haven’t found this question asked on StackOverflow, but did find something very similar looking on CSS tricks. I did have a link here but as a first time poster my question was rejected due to having more than 2 links in it (due to the additional 2 links below showing screenshots of the issue). So I had to remove it… The answer to the post on CSS tricks gives me some areas to look at, but it’s not specific – it says “Figured it out on my own. Solution involved a combination of moving the label tags and some IE conditional CSS.”

The difference in display of the form is shown in these screenshots:

IE7: http://www.s203574650.websitehome.co.uk/Screenshots/IE7_form.jpg

IE10: http://www.s203574650.websitehome.co.uk/Screenshots/IE10_form.jpg

HTML code:

<form id="contact" action="contact_us.php" method="post">
<div>
<label for="fullname">Your Full Name:</label>
<input id="fullname" name="fullname" type="text" placeholder="eg. John Smith" required aria-       required="true" >
</div>
<div>
<label for="email">Your Email Address:</label>
<input id="email" name="email" type="email" placeholder="eg. johnsmith@gmail.com" required aria-    required="true" title="Please enter a valid email address">
</div>
<div>
<label for="phone">Your Phone Number (optional):</label>
<input id="phone" name="phone" type="tel" placeholder="eg. 07000 123456" pattern="([0-9]|( |-)?)    {10,14}" title="Please use only digits, spaces and hyphens.">
</div>
<div>
<label for="experience">Your Badminton Experience:</label>
<select name="experience">
<option value="default">Please Choose</option>
                <option value="Intermediate">Intermediate</option>
                  <option value="Advanced">Advanced</option>
                   <option value="Don't know">Don't know</option>
                   </select>                
</div>
 <div>
<label for="club_matches">Have you previously played matches for a club?:</label>
 <input type="radio" name="club_matches" value="Yes">Yes
 <input type="radio" name="club_matches" value="No" checked>No
 </div>
<div>                   
<label for="info">Additional Info / Questions: </label>
<textarea name="info" type="text">
</textarea>
</div>
<div>
<label for="blank"></label>
<input type="submit" id="submit" value="Submit Form" name="sent">
</div>
</form>

And the CSS:

   /* styles for contact form */
#contact
{
background-color: #DDE2E2;
-webkit-border-radius: 10px;
-o-border-radius: 10px;
-moz-border-radius: 10px; 
border-radius: 10px;
border: solid slategrey 2px;
box-shadow: 3px 3px 5px slategrey;
-o-box-shadow: 3px 3px 5px slategrey;
-moz-box-shadow: 3px 3px 5px slategrey;
-webkit-box-shadow: 3px 3px 5px slategrey;
padding: 3%;
font-family: arial;
color: #0099FF;
font-weight:bold;
align:center;
width: 80%;
margin-left:40px;
}

label
{
width: 40%;
float:left;
text-align:right;
margin-right: 2em;
font-size: 0.8em;
}

label, select, textarea, input
{
margin-bottom: 1.5em;
clear:left;
margin-left: 1em;
}

#submit
{
margin-top: 5%;
margin-bottom: 0;
}
  • 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-15T16:19:55+00:00Added an answer on June 15, 2026 at 4:19 pm

    The problem is that you’re clearing floats for the select boxes, textareas, and inputs as well as for the labels, when you should only be clearing them for the labels.

    label, select, textarea, input {
        margin-bottom: 1.5em;
        clear: left;
        margin-left: 1em;
    }
    

    Remove clear: left; from the CSS selector for label, select, textarea, input and add it to the one for label:

    label {
        width: 40%;
        float: left;
        clear: left;
        text-align: right;
        margin-right: 2em;
        font-size: 0.8em;
    }
    label, select, textarea, input {
        margin-bottom: 1.5em;
        margin-left: 1em;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page which displays a form that a logged-in user can use
I have an HTML5 form that takes in the date which is then submit
I have a form with a text input box which displays similar entries to
I have a form which displays in a jQuery FancyBox div with id mcform.
I have an HTML form which, when submitted by the user, will call a
I have an html form which when it gets submitted it calls a JavaScript
I have a html form which have a select list box from which you
I have this html form which has options: <tr> <td width=30 height=35><font size=3>*List:</td> <td
I have a HTML form which allows a user to add rows ad hoc
I have a simple html login form which is validated with javascript before its

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.