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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T19:07:18+00:00 2026-06-05T19:07:18+00:00

Okay so say I have a form element like this: HTML: <div class=form-item> <label>Current

  • 0

Okay so say I have a form element like this:

HTML:

<div class="form-item">
    <label>Current password</label>
    <input id="edit-current-pass" class="form-text" type="password" maxlength="128" size="25" name="current_pass" autocomplete="off">
    <div class="description">lorum ispum</div>
</div>

CSS:

.description {
    clear: both;
}

label {
    float: left;
    line-height: 34px;
    margin-right: 20px;
    width: 140px;
}
form input.form-text {
    background-image: none !important;
    border: 1px solid #E5E5E5;
    height: 30px;
    padding: 1px 2px;
}

Is it possible to make it so the input takes up the remaining width of the line besides the left floated label element?

(FYI the parent container has a width set to it).

I’d like to make this responsive so the form grows and shrinks to the browser window.

  • 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-05T19:07:19+00:00Added an answer on June 5, 2026 at 7:07 pm

    I thought this might not be possible with purely HTML/CSS, but I managed it with an additional wrapper around the input box. Check it out on JSFiddle.

    HTML

    <div class="form-item">
        <label for="edit-current-pass">Current password</label>
        <span class="input">
            <input id="edit-current-pass" type="password" maxlength="128" size="25" name="current_pass" autocomplete="off">
        </span>
        <div class="description">lorum ispum</div>
    </div>​
    

    CSS

    .description {
        clear: both;
    }
    
    label {
        float: left;
        line-height: 34px;
        margin-right: 20px;
        width: 140px;
    }
    .input {
        display: block;
        border: 1px solid #E5E5E5;
        padding: 1px 2px;
        overflow: auto;
    }
    .input input {
        display: block;
        float: left;
        background: transparent;
        width: 100%;
        height: 30px;
        border: 0;
        padding: 0;
        margin: 0;
    }​
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay, so say I have a class that looks like this : public class
Okay, let's say you have something like this: <span class=image style=background-image: url('http://www.example.com/images/image1.png')></span> Every CSS
Okay, let's say we have a class defined like public class TestClass { private
Okay so my question is this. Say I have a simple C++ code: #include
Okay say I have a function like below: -(NSNumber *)calculate{ NSNumber *myNum = [[[NSNumber
Okay, so let's say I have a class file called Orange, and then two
Just wondering how people would go about this. Say I have one class that
Okay, lets say I have a URL like so, which is mapped via HTTP
How can I re-use a function? Okay lets say I have this main function
Okay, so let's say I have some random abstract base class Base and 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.