0
If in the code below the font was monospace and each character was 10px wide, the output would be 330px, the font size and type interfere with this value.
<textarea>fonte monospace com 33 caracteres</textarea>
0
If in the code below the font was monospace and each character was 10px wide, the output would be 330px, the font size and type interfere with this value.
<textarea>fonte monospace com 33 caracteres</textarea>
Browser other questions tagged javascript html css
You are not signed in. Login or sign up in order to post.
Your question seems to have some problems and your experience here in Stack Overflow may not be the best because of it. We want you to do well here and get what you want, but for that we need you to do your part. Here are some guidelines that will help you: Stack Overflow Survival Guide in English (short version). If the solution is very simple it is still possible for someone to do so in the comments.
– Bruno Warmling
I can’t put a span tag inside a textarea tag. If you put the textarea inside the span tag it will take the width of the input and not only the text.
– Vinícius Macedo
Is that a question or a statement? Remember that in Portuguese (and several other languages), a question ends with the sign of "?".
– Sam
See if it helps https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect
– Augusto Vasques