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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T02:56:11+00:00 2026-05-11T02:56:11+00:00

I have attempted to use this CSS to set the width of my form

  • 0

I have attempted to use this CSS to set the width of my form elements:

input[type='text'], textarea { width:250px; } 

If you look at this Firefox screenshot you’ll see that the fields are not the same width. I get a similar effect in Safari.

alt text http://screamingv.com/ss.png

Are there any workarounds?

UPDATE: Thanks for the info so far. I’ve now made sure padding/margin/border on both elements are set the same. I was still having the problem. The original CSS I posted was simplified… I was also setting the height of the textarea to 200px. When I remove the height styling, the widths match. Weird. That makes no sense.

Browser bug?

  • 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. 2026-05-11T02:56:12+00:00Added an answer on May 11, 2026 at 2:56 am

    Try removing padding and borders. Or try making them the same for both elements

    input[type='text'], textarea {     width:250px;     padding: 3px;     border: none;     } 

    Or:

    input[type='text'], textarea {     width:250px;     padding: 0;     border: 1px solid #ccc;     } 

    INPUT and TEXTAREA elements often have some padding applied by the browser (varies by browser) and this can make things appear effectively wider than the assigned width.

    UPDATE: also box-sizing: border-box; is a handy way to set widths that that padding and border will eat into rather than add onto. See: http://www.paulirish.com/2012/box-sizing-border-box-ftw/

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

Sidebar

Ask A Question

Stats

  • Questions 59k
  • Answers 59k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Use the class property and change your css styles to… May 11, 2026 at 8:57 am
  • added an answer You can't bind properly to an IQueryable<T> (except in ASP.NET… May 11, 2026 at 8:57 am
  • added an answer 1) If the Map can be immutable: Collections.emptyMap() // or,… May 11, 2026 at 8:57 am

Related Questions

I have attempted to use this CSS to set the width of my form
Can Unicode characters be encoded and decoded with Base64 ? I have attempted to
I have a Spring Interceptor which attempts to add an HTTP header in the
I have c++ code that attempts to dynamically allocate a 2d array of bytes
I have an SSIS package that connects to a mysql server and attempts to
I have a python sgi script that attempts to extract an rss items that
I have a simple NAnt build file, which attempts to perform an update from
I have a new project which simply put, is an attempt to formalize the
I have several small open-source projects that I wrote. All my attempts to find
Here's an interesting question. I have a system that attempts to run some initialization

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.