开发者

Resizing controls when resizing jquery dialog box

开发者 https://www.devze.com 2023-03-17 16:58 出处:网络
I have 3 controls in my div, one of which is a textarea. I am using the div as a dialog box.When I resize the dialog box, I want to resize the textarea.I am using the code, but it`s not working. Help

I have 3 controls in my div, one of which is a textarea. I am using the div as a dialog box. When I resize the dialog box, I want to resize the textarea. I am using the code, but it`s not working. Help please.

  <td>@Html.TextArea("myBox", new {@style = "height:X;width:X;"})
    </td>

$('#editDiv').dialog({ autoOpen: false, modal: true, buttons: { "Done": function () {  });   

<div id="editDiv"> <table><td>@Html.Text("text1")</td><td>@Html.Text("text2")</td><td>@Html.TextArea("comments", new { @maxlength = 5})</td></table></div>

I have tried the following, which isn`t working:

.#editDiv table
{
    width: 100%;
    height: 100%;
}
.#editDiv tr
{
    height: 100%;
}
.#editDiv TextArea开发者_运维技巧
{
    width: 100%;
    height: 100%;
}


add this to css

#dialogBoxId textarea
{
  width:95%;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消