我正在使用带有css的jsp来标记<td>
标记内的<table>
。
我想要下面的代码:
但现在我得到了:
#bengalistorycontainer{
width:100%;
}
table.my-special-table {
width: 10px;
height: 10px;
border: 1px rgb(89,89,89) solid;
}
<table class="my-special-table">
<tr>
<c:forEach begin="1" end="${classfile}" var="i"varStatus="loop">
<c:choose>
<c:when test="${classfile eq i}">
<td>${1} </div></td>
</c:when>
<c:otherwise>
<td><a href="#">${2}</a></td>
</c:otherwise>
</c:choose>
</c:forEach>
<c:if test="${totalpagenumber != 1}">
<td> <a href="#">next</a> </td>
</c:if>
我做错了什么?
答案 0 :(得分:6)
只需将代码编辑为以下内容:
#bengalistorycontainer{
width:100%;
}
table.my-special-table td{
width: 10px;
height: 10px;
border: 1px rgb(89,89,89) solid;
}
<table class="my-special-table">
<tr>
<c:forEach begin="1" end="${classfile}" var="i"varStatus="loop">
<c:choose>
<c:when test="${classfile eq i}">
<td>${1} </div></td>
</c:when>
<c:otherwise>
<td><a href="#">${2}</a></td>
</c:otherwise>
</c:choose>
</c:forEach>
<c:if test="${totalpagenumber != 1}">
<td> <a href="#">next</a> </td>
</c:if>
你选择了表,而不是td元素.. :)