How to fix this re-positioning textarea?

EDIT: solved by @marzelin first method:

1 method: add !important to textarea margin and width properties.

Try to resize textarea and then resize browser. Textarea will re-position self
code:

1 method: add !important to textarea margin and width properties.
2 method: disable rezise by setting resize: none to textarea.

1 Like

first method do the job, but how? ( i know what “!important” means )

second method doesn’t fulfill my requirements

thanks

when textarea is resized, browser injects inline styles to the element overwriting your styles. Adding !important gives your styles greater specificity, so they win.

1 Like