我想打破长句。我已经尝试了所有的自动换行,分词,宽度,最大宽度和表格布局

时间:2017-03-06 05:21:55

标签: html css

<div class="modal-body">


<fieldset id="ad" class="display" cellspacing="0" style="padding: 5px;" >
    <legend>Audit Details</legend>

    @if (Model.Questiontitle.Count == 0)
    {
        <p >No Record Available </p>
    }
    else
    {
        <table class="display" cellspacing="0" style="padding: 5px; table-layout:fixed ; width:100%">
            <thead>
                <tr>
                    <th style="width:60%">Question</th>
                    <th style="width: 20%; margin-left: 20px">Answer</th>
                    <th style="width: 20%; margin-left: 20px">Auditor Comment</th>
                </tr>
            </thead>
            @{for (int i = 0; i < @Model.Questiontitle.Count; i++)
            {
                <tr>
                    <td style="width:60% ">
                        <div style="max-width:20%">@Model.Questiontitle[i]</div>
                    </td>
                    <td style="width: 20%">
                        @Model.Ansvalue[i]
                    </td>
                    <td style="width: 20%">
                        @Model.AnsComment[i]
                    </td>
                </tr>
            }
        }
        </table>
    }

    </fieldset>
</div>

0 个答案:

没有答案