设置textarea的显示屏全在Chrome [英] Set Textarea display full in Chrome

查看:147
本文介绍了设置textarea的显示屏全在Chrome的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有edit.aspx页:

I have edit.aspx page:

<body style="background-color: rgb(225, 255, 255)">
<form id="form1" runat="server">
<div>
    <table style="width: 100%">
        <tr>
            <td>
                <table style="width: 100%">
                    <tr>
                        <td style="width: 1%" align="right">
                            <span id="LabelCapFileName" style="white-space:nowrap">File name:</span>                
                        </td>
                         <td>
                            <span id="LabelFileName" style="font-weight:bold;">About.asp</span>
                        </td>
                        <td align="right">
                                <asp:Button ID="btnSave" runat="server" Text="Lưu" />
                         </td>
                        </tr>
                    </table>
            </td>
        </tr>
        <tr>
            <td>
                <div style=" position: absolute; top: 45px; bottom: 5px;
                        left: 5px; right: 5px">

                        <textarea id="code" name="code" runat="server"  wrap="off" style=" width:99%; height:99%" >               
                          </textarea>
               </div>
            </td>
        </tr>
    </table>   

</div>      
    </form>

即使TextArea性能风格=宽度:99%;高:99%,它仍然在左srceen显示小。

Even the Textarea has style=" width:99%; height:99%", it still display small in a left srceen.

我要的文本区域自动显示全在Chrome浏览器一样的:

I want the Text Area auto display full of Chrome Browser like:

我不知道是什么让textarea的显示为错误的方式。有没有在我的code以上的任何错误,我需要你的意见来完成我的项目。帮助!

I dont know what make the textarea display as the wrong way. Is there any mistake in my code above, I need your opinion to finish my project. Help!!

推荐答案

你设置的doctype在HeaderContent控制?

Did you set the doctype in your HeaderContent control?

如果不是,这样做的:

&LT;!DOCTYPE HTML&GT;

如果您仍然有问题,你可以尝试设置风格:宽度:100%;身高:100%; 的textarea 控件的 D 元素也,也可能对 HTML 像这样的元素:

If you still have problems, you could try setting style:width:100%; height:100%; on the textarea control's td element also, possibly also on the html and body elements like so:

html,body,#code
{
    width: 100%;
    height: 100%
}

如果您在浏览器和查看源文件打开此,它贴在这里会更容易解决您的问题。

If you open this in a browser and "View Source" and paste it here it would be easier to troubleshoot your problem.

这篇关于设置textarea的显示屏全在Chrome的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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