0
你好傢伙我有一個文本區上面的div,他們都是相同的寬度,當我提交我的表單div擴大了。我怎樣才能保持與文字包裝相同的大小?謝謝?需要添加包裝文本到我的div
CSS:
div.tarea {
background-color: #DDDDD0;
font-family: arial, sans-serif;
font-size: 10pt;
margin: 0px;
width: 100%;
height: 100px;
overflow-y:auto;
border:2px grey solid;
}
HTML:
<tr>
<td colspan="4">
<c:if test="${action == 'update'}">
<%-- Preserve the indentation for this TEXTAREA in order to keep extra whitespace out of it. --%>
<div class="tarea" name="mcRemarkOld" ><c:forEach var="mcbean" items="${form.mcRemarks}">--- ${mcbean.auditable.lastModifiedBy.firstName} ${mcbean.auditable.lastModifiedBy.lastName}, <fmt:formatDate value="${mcbean.auditable.lastModifiedDate}" pattern="${date_time_pattern}" />
<br><br>${mcbean.remark}
<rbac:check operation="<%=Operation.ADMIN_UPDATE%>">
<a class="edit_activity" href="show.edit_remarks?remarkId=${mcbean.id}&type=1&hotPartId=${form.hotPartId}"><img class="edit" src="../images/icon_edit.gif" border="0" alt="Edit"/></a>
</rbac:check>
<br>
<br>
</c:forEach></div><br/>
</c:if>
<rbac:check field="<%=Field.HOT_PARTS_SOR_REMARKS%>" display="none">
<TEXTAREA tabindex="20" name="mcRemark" rows="7" cols="100" scrolling="auto" <c:if test="${not empty lock && !lock.locked && action != 'add'}">disabled="disabled"</c:if>>${form.mcRemark}</TEXTAREA>
</rbac:check>
</td>
</tr>
加入
回答
您可以使用CSS屬性,
word-wrap
。這應該適用於所有主流瀏覽器:http://www.w3schools.com/cssref/css3_pr_word-wrap.asp。來源
2011-11-23 15:08:10
來源
2011-11-23 15:12:24
加入this..and該div擴大 –
我通過添加解決了這個問題:
來源
2011-11-23 16:05:34
相關問題