I need the text inside a textarea to look exactly the same as the text inside a div element, including padding, etc.
The html below works on my computer (Windows Chrome). However, when I view it on an actual iPhone (Safari/Chrome, OS 10), it adds extra space inside the textarea, similar to left-padding (but left-padding is 0). How do I get rid of this space?
(I don't think I had this issue in iOS 9.)
<style>
.my_area{
margin: 0;
padding: 0;
outline: 0;
border: 0;
box-sizing: border-box;
white-space: pre-wrap;
word-wrap: break-word;
font-family: arial;
font-size:17px;
line-height:26px;
width:200px;
overflow:hidden;
background:yellow;
border:1px solid black;
border-radius:0;
}
</style>
<textarea class = "my_area">q w e r t y u i o p a s d f g h j k l z x c v b n</textarea>
<br/>
<div class = "my_area">q w e r t y u i o p a s d f g h j k l z x c v b n</div>
Edit: I use
width=device-width, initial-scale=1.0
in the header so I'm viewing the page at proper resolution for mobile.