Fixed error loading Firefox textarea?

I am trying to create a fixed text area that fills the entire width and height of the browser window using only CSS, and the following works fine in Chrome:

textarea { border: 2px solid #3D6AA2; padding: 5px; position: fixed; top:0; left:0; right:0; bottom:0; resize: none; } 

http://jsfiddle.net/BulletzBill/FZr9k/1/

However, if you are viewing a script in Firefox, it looks as if it does not take into account the bottom or right rules at all. Is this a known bug in firefox, or are there any ways to solve it? I would like to avoid using javascript / window resize listeners, if possible.

+3
source share
1 answer

Here is the updated version of jsfiddle

You need to do width:100% , height:100% and box-sizing: border-box;

You need only 2 points of position top and left

+2
source

Source: https://habr.com/ru/post/902544/


All Articles