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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:56:20+00:00 2026-05-28T05:56:20+00:00

Sorry for the rather vague title, I couldn’t think up a better description for

  • 0

Sorry for the rather vague title, I couldn’t think up a better description for my problem.

I have a simple HTML form:

<html>
<FIELDSET>
    <DIV>
        <SPAN class="label">Label 1</SPAN>
        <DIV class="div">
            <input id="input1" value="The first input box">  
        </DIV>
    </DIV>
    </FIELDSET>    

    <FIELDSET>
        <DIV>
            <SPAN class="label">Label 2</SPAN>
            <INPUT id ="input2" class="textbox" value="the second input box">
        </DIV>
    </FIELDSET>
</html>

with some simple styling

.label{float:left}
.textbox{float:right;width:75%}
.div{float:right;width:75%}

With this, I would expect both input boxes to be left aligned, as input2 is has float:right with a width of 75%, and the parent div of input 1 is also floating right with the same width. However, thy don’t line up correctly, and I am not sure why. Tested in IE8 and firefox 9 – jsfiddle link: http://jsfiddle.net/nrF2W/

Note: I tried to make the simplest possible example which still showed the problem I was having. The div containing the first input box is intended to have more than just a single input box.

Edit: Say for example the initial input div should be:

<DIV class="div">
    <input value="1">
    <input type="checkbox"> 
</DIV>

Which is an input box followed by a checkbox, on the same line. Setting the width of the input box to be 75% doesn’t work for this situation. To clarify, its not the length of the input boxes not lining up that I have the issue with, it’s their lack of alignment on the left.

  • 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-28T05:56:21+00:00Added an answer on May 28, 2026 at 5:56 am

    http://jsfiddle.net/nrF2W/2/

    You had 75% for the div alone, not for the input

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

Sidebar

Related Questions

Sorry for the rather vague title, but it seemed befitting of a similarly vague
Sorry for the long winded title, but the requirement/problem is rather specific. With reference
Hello everybody and sorry for the rather confusing question-title. I have a Hibernate Class
Sorry if this question is too vague, but I'd rather not muddy it's point
Sorry the title isn't more help. I have a database of media-file URLs that
Sorry if the title is poorly descriptive, but I can't do better right now
(Sorry this is rather a vague question. My attempts to be clearer [and indeed
Sorry about the terrible title. I have a signed assembly 'Signed.dll' that is a
Sorry about the title but I can't really think of a quick way of
Sorry if this is a bit vague... I have a Drupal install (6.14), and

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.