问题
I'm trying to make my textarea
to fill all available space, I used:
I can't use 100% width
& height
as I have margins & paddings all over the place, I have to use absolute position within relative position parent + top
, right
, bottom
& left
all 0 - which doesn't work in FF. Any thoughts on how to fix it?
Update 1 - when I replace my textarea
with DIV
it starts working.
Update 2 - Actual markup:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div style="position: relative; margin: 25px; width: 200px; height: 200px; background-color: Gray;">
<textarea style="top: 0px; right: 0px; bottom: 0px; left: 0px; position: absolute;">A</textarea>
</div>
</body>
</html>
回答1:
Mr Snook failed back in march last year, but he suggested a way you could solve it:
wrap the textarea in another element
Does this in any way help you?
来源:https://stackoverflow.com/questions/11756087/100-textarea-in-firefox-using-absolute-position