Chrome text width not applied properly

The contact window in the footer of the text area and input field are located in a width of 310px div.

http://www.bantros.net

They were set to a width of 308 pixels with a border of 1px. In IE9, Firefox and Opera all have the same width, but in Chrome (my default browser) textarea overflows if the width is not set to 304px.

Using the Inspect Element I can report that it is 314 pixels wide, but I'm not too sure why it does this. Any information or help would be appreciated, thanks

+4
source share
2 answers

The browser uses padding: 2px . Apply padding: 0 .

 .form1 textarea, .form1 input { padding: 0; } 

This problem can be solved using CSS reset , btw.

+8
source

One thing I see is the source of the problem: in textarea chrome places a 2px pad for left and right. In input chrome places a 0px pad on the left and right.

If you cancel it, everything should be fine.

+3
source

All Articles