FireFox中使用绝对位置的100%TextArea [英] 100% TextArea in FireFox using absolute position

查看:139
本文介绍了FireFox中使用绝对位置的100%TextArea的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让我的 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先生失败了,但他提出了一种解决方法:


将textarea包装在另一个元素中


这是否以任何方式帮助您?

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:

wrap the textarea in another element

Does this in any way help you?

这篇关于FireFox中使用绝对位置的100%TextArea的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆