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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:40:07+00:00 2026-05-25T15:40:07+00:00

I have following textbox in my first HTML page: <input tabindex=4 type=text class=search_textbox roundedCorners

  • 0

I have following textbox in my first HTML page:

<input tabindex="4" type="text" class="search_textbox roundedCorners" id="search_query" name="search_query"/>

.roundedCorners{        
  border:1px solid black;
  padding-left: 5px;
  padding-right: 5px;
  -webkit-border-radius: 4px;
  -moz-border-radius: 4px;
}
.search_textbox {
  position: absolute;
  width: 187px; 
  height: 21px;    
  left: 96px;
  top: 96px;    
  padding-right: 29px;
  padding-left: 48px;
}

When I see it in the browser, in the first page the “final” width of search_textbox is 187+48+29=264px. But when I insert the same thing in the second page and open it with the same browser the “final” width of search_textbox is only 187px.

I am testing it in Chrome and Mozilla. All of them show exactly the same picture.

Why? Am I doing something wrong or what?

UPDATE 1

I have noticed that in the second page Chrome is adding following style automatically, while in the first page it is not adding it:

input:not([type="image"]), textarea {                    user agent stylesheet
  -webkit-box-sizing: border-box;
}

I think this property is causing this error with the width, right? But I have searched in all my .css files and couldn’t find that property at all. How Chrome is adding that property itself in one page and not adding in another page?

UPDATE 2

I have solved the problem. I have noticed that in the first page I had <!DOCTYPE html> statement but in the second one no, so once I have added that statement into the second page the problem has been solved. But still I just wonder why?

  • 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-25T15:40:07+00:00Added an answer on May 25, 2026 at 3:40 pm

    Seeing as you’ve fixed your problem, this answer is a little superfluous, but whatever 🙂

    You probably know this already, but the textareas width of 187px is the default for your browser, which leads us nicely on to my next paragraph.

    The reason CSS styles aren’t fetched and parsed by a document with no doctype is due to the fact that, technically, it’s not a valid document. Once you add the doctype, problem solved.

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

Sidebar

Related Questions

I have the following problem: I have an HTML textbox ( <input type=text> )
<form> Last Name <input name=lastname type=text/><br/> First Name <input name=firstname type=text/><br/> Middle Name <input
I have the following textbox server control in my web page: <asp:TextBox ID=txtZip runat=server
Let's say we have the following code in a class: //class code TextBox t
What's the best way to have the following? Name: [Textbox] Inside a div? I
I have used the following template in my project: <DataTemplate x:Key=textBoxDataTemplate> <TextBox Name=textBox ToolTip={Binding
Assuming I have the following ASP.NET HTML Code: <html> <head><title>Test Page</title></head> <body id=bodyID> <asp:Label
I have the following webform: <%@ Page Language=C# AutoEventWireup=true CodeBehind=Default.aspx.cs Inherits=TestWebApp.Default %> <!DOCTYPE html
I have the following as the value for my textbox in SSRS report: =iif(IsNothing(Fields!MyDate.Value),
If I have the following in an ASP.NET Web Form: <asp:TextBox runat=server ID=tbxUser/> 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.