如何设置标签内的项目?

时间:2015-09-16 16:00:23

标签: html css

我正在使用带有css的jsp来标记<td>标记内的<table>。 我想要下面的代码:

doesn't raise any events

但现在我得到了:

enter image description here

#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>
     

enter image description here

我做错了什么?

1 个答案:

答案 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元素.. :)