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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:52:07+00:00 2026-06-11T21:52:07+00:00

With this markup: <label for=example> <textarea id=example cols=40 rows=10></textarea> </label> The label does not

  • 0

With this markup:

<label for="example">
  <textarea id="example" cols="40" rows="10"></textarea>
</label>

The label does not expand with the textarea and hence the textarea pushes itself under the following fields in the form.

Does anyone know how to get the label to expand to the size of the textarea using CSS?

I’ve tried:

label { display: table; }

and all kinds of margins and padding on both the label and the textarea, but to no avail.

  • 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-11T21:52:08+00:00Added an answer on June 11, 2026 at 9:52 pm

    I think you’ll need to close the text area properly, i.e with a closing </textarea> tag – though, I’m unsure of the use of label in this way – perhaps the for attribute is made redundant by enclosing the target element with the label tags. :shrugs:
    Removing the </textarea> tag from the below example makes the check-box disappear, the point being that page display is broken if the tag is omitted. 🙂

    <!DOCTYPE html>
    <html>
    <head>
    </head>
      <body>
        <label for="cb">
            <textarea id="example" cols="40" rows="10"></textarea>
        </label>
        <input type='checkbox' checked='true' id='cb'/>
      </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is my markup, I need to align gray label under the blue label
With this markup: <div id=e> <div id=f></div> </div> Does $('#e > #f') return the
Why does this markup ... <asp:TextBox ID=TextBox1 runat=server CausesValidation=False></asp:TextBox> <asp:RegularExpressionValidator ID=RegExValidatorTextBox1 runat=server ControlToValidate=TextBox1 Text=Invalid
In this simple example, I have 5 GroupBox es, directly under a Grid .
I have the following markup for my input fields: <div class=required> <label for=Name>Name <em>*</em></label>
I have this markup <div class=input text> <label for=Experience0ExperienceContent>Experience Content</label> <input name=data[Experience][0][experience_content] class=span3 id=Experience0ExperienceContent
For the CSS gurus out there, this markup outputs a checkbox with a label
I start with this markup: <div> <span> <label for=Item[0]>Item #1</label> <input type=text value= name=Item
I'd like to be able to generate the following markup: <label for=field>Something <span class=hint>Field
In this markup, I need to replace the label text E-mail with User Name.

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.