css布局之左侧固定右侧自适应布局

参考代码如下:

<form id="form1" style="height:100%; overflow:hidden;">
    <div style="float:left; 490px;  border-right:5px #333 solid; height:100%;">
        <table class="form">
            @Html.HiddenFor(m => m.NotificationId)
            <tr>
                <th class='formTitle'>通知标题: </th>
                <td class='formValue'>
                    @Html.TextBoxFor(m => m.Title, new { @class = "txt required", datacol = "yes", err = "通知标题", checkexpession = "NotNull" })
                </td>
            </tr>
            <tr>
                <th class='formTitle'>有效期: </th>
                <td class='formValue'>
                    @Html.TextBoxFor(m => m.ValuableDate, new { @class = "txt Wdate", datacol = "yes", err = "有效期", checkexpession = "NotNull", style = "370px", onfocus = "WdatePicker({dateFmt:'yyyy-MM-dd',minDate:'%y-%M-%d'})" })
                </td>
            </tr>
            <tr>
                <th class='formTitle'>通知正文: </th>
                <td class='formValue'>
                    @Html.TextAreaFor(m => m.Content, new { @class = "txt required", datacol = "yes", err = "通知正文", checkexpession = "NotNull", style = "height:100px;370px" })
                </td>
            </tr>
            <tr>
                <th class='formTitle'>附件: </th>
                <td class='formValue' style="text-align: center;margin-top:10px;">
                    <input type="file" id="file_uploadattachment" name="file_uploadattachment" value='附件管理' />
                    @Html.TextBoxFor(m => m.Attachment, new { @class = "txt", style = "display:none" })
                </td>
            </tr>
            <tr></tr>
        </table>

    </div>
    <div style="overflow:auto; height:200px;scrollbar-face-color:#f60;scrollbar-highlight-color:#F60;scrollbar-3dlight-color:#f60;scrollbar-darkshadow-color:#f60;scrollbar-Shadow-color:#f60;scrollbar-arrow-color:#000;scrollbar-track-color:#fff;">
        <table class="form" id="radios">
            <tr style="margin-top:10px">
                <th class='formTitle'>接收对象 : </th>
                <td class='formValue'>
                    @Html.RadioButtonFor(Model => Model.ReceiveObjects, 0, new { @id = "ReceiveObjects0", @name = "ReceiveObjects", @checked = true })教师
                </td>
                <td class='formValue'>
                    @Html.RadioButtonFor(Model => Model.ReceiveObjects, 1, new { @id = "ReceiveObjects1", @name = "ReceiveObjects" })学生
                </td>
                <td class='formValue'>
                    @Html.RadioButtonFor(Model => Model.ReceiveObjects, 2, new { @id = "ReceiveObjects0", @name = "ReceiveObjects" })家长
                </td>
            </tr>
        </table>

        <div id="jiaoshi" style="margin-left:95px;margin-top:10px">
            <div id="ConditionInstall">
            </div>
        </div>

        <div id="xuesheng" style="display:none;margin:0 auto;margin-left:95px;margin-top:10px">
            <div><img src="/Content/Images/Icon16/rosette.png" />选择要发送的班级</div>
            <div id="ConditionInstall1">
            </div>
        </div>

        <div id="jiazhang" style="display:none;margin:0 auto;margin-left:95px;margin-top:10px">
            <div><img src="/Content/Images/Icon16/rosette.png" />选择要发送的班级</div>
            <div id="ConditionInstall2">
            </div>
        </div>

    </div>
</form>
原文地址:https://www.cnblogs.com/yechangzhong-826217795/p/5704645.html