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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:15:25+00:00 2026-06-05T00:15:25+00:00

I am setting the width of my text input’s and text area using css:

  • 0

I am setting the width of my text input’s and text area using css:

input[type=text], 
input[type=file],
textarea {
    width: 305px;
}

For some reason in firefox the textarea width appears shorter:

enter image description here

Works fine in safari and chrome. How can I fix this?

Solution:

As explained here:
Unable to set textarea width with CSS
adding:

padding: 0;
border: 1px solid #ccc;

does the trick.

  • 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-05T00:15:26+00:00Added an answer on June 5, 2026 at 12:15 am

    I believe this is because the input tags and textarea tags have a different border by default. Try adding a border to your CSS to achieve the same widths.

    input[type=text],
    input[type=file],
    textarea {
        width: 305px;
        border: 1px solid black;
    }
    

    Here’s an example: http://jsfiddle.net/Das2q/

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

Sidebar

Related Questions

Sample HTML/CSS: <div class=container> <input type=text /> <div class=filler></div> </div> div.container { padding: 5px;
i have text input and select boxes be at a width of 40px... i
In my jqgrid I'm setting some values for textboxes using setCell Method. But when
I have a div <div id=ab> which contain a text field <input type=text class=a
I have an input ( type='submit' ) in a div with a fixed width
the css code input.long{ width:50%; max-length:50; } input.number{ width:4em; max-length:4; } to apply html
I am using a UISearchBar to match text input against entries in a database
So I have a text input <input type=text value=3 class=field left> Here is my
For some reason the button under the text fields seems to get wider than
I have contenteditable span with a max-width setting that allows the user to enter

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.