FireFox中使用绝对位置的100%TextArea [英] 100% TextArea in FireFox using absolute position
问题描述
我试图让我的 textarea
填满所有可用的空间,我用过:
我可以不使用100%宽度
& height
因为我有margin&我必须在相对位置中使用绝对位置父+ top
,右
, bottom
& left
全0 - 这在FF中不起作用。有关如何解决它的任何想法?
更新1 - 当我用 DIV
textarea >
更新2 - 实际标记:
<!DOCTYPE html PUBLIC - // W3C // DTD XHTML 1.0 Transitional // ENhttp://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>
去年3月Snook先生失败了,但他提出了一种解决方法:
这是否以任何方式帮助您?
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>
Mr Snook failed back in march last year, but he suggested a way you could solve it:
Does this in any way help you?
这篇关于FireFox中使用绝对位置的100%TextArea的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!