In my efforts to ensure a consistent line width inside a textarea across IE8, Firefox, and Safari, I have encountered an issue where Firefox seems to add an extra pixel of padding compared to the other browsers. This results in text wrapping differently and not lining up as intended.
Even when applying the same styling class to both a div and textarea, there is a visible difference with the textarea appearing to have a 1px offset. Here is the CSS class being used:
.testbox{
padding:0;
margin:0;
border:0;
background: red;
width: 40px;
height: 40px;
font-size: 12px;
line-height: 16px;
}
Adjusting the padding values only creates more discrepancy between the div and textarea. Any suggestions on how to make Firefox render a textarea like a div or fix this unexpected padding behavior?