textarea in phpBB style

79 Views Asked by At

I am trying to implement a textarea to my custom made module in user panel in phpBB CMS.

I created a basic HTML template script, that just shows a textarea with plain text in it. Tested it on localhost, worked just like expected. As soon as I uploaded it on my website, the size of textbox has shrunk and when I right clicked -> Inspect element it said "textarea.auto-resized".

This is my code:

<style>
textarea {
  resize: none;
}
</style>
<textarea readonly rows="45" cols="15">Text.</textarea>

Is there any CSS atribute that I can set to "style" in order to prevent the browser from auto-resizing my textarea?

1

There are 1 best solutions below

5
UCYT5040 On

Try using this code:

<style>
textarea {
  resize: none !important;
}
</style>
<textarea readonly rows="45" cols="15">Text.</textarea>

You can learn more about !important here.