2011-07-11 119 views
0
<table class="data_table vert_scroll_table"> 
<tr> 
    <%-- Our colspans must account for whether there is an "Action" column (for editable comments). --%> 
    <c:choose> 
     <c:when test="${lock.locked || form.entryId < 0}"> 
      <c:set var="cols" value="5" scope="page"/> 
     </c:when> 
     <c:otherwise> 
      <c:set var="cols" value="4" scope="page"/> 
     </c:otherwise> 
    </c:choose> 


</tr> 
<tr> 
<ctl:sortableTblHdr styleClass="center" title="Comments" property="comment" type="top">Comments</ctl:sortableTblHdr> 
</tr> 


<c:forEach var="comments" items="${entry.comments}"> 
    <c:choose> 
     <c:when test="${activity.lockedByCarryover}"> 
      <c:set var="lockedByCO" value="lockedByCarryover" scope="page" /> 
     </c:when> 
     <c:otherwise> 
      <c:set var="lockedByCO" value="" scope="page" /> 
     </c:otherwise> 
    </c:choose> 

    <tr id="id${comments.id}" class="${lockedByCO}"> 
     <td class="wrappable" id="comments-${comments.id}">${comments.comment}</td>                
    </tr>     



</c:forEach> 
<c:if test="${lock.locked || form.entryId < 0 }"> 
    <%-- This is the row for adding a new comment. --%> 
    <tr id="commentRow"> 
     <td><input type="text" id="comment" name="comment" size="50" maxlength="250" onkeypress="javascript:return noenter();"/> 
      <a href="javascript:addComment();"><img src="../images/icon_add.gif" border="0" alt="Add"/></a> 
     </td> 

    </tr> 
</c:if> 

增加寬度表問題

我想:

 <table class="data_table vert_scroll_table" style="width: 400px;"> 
    <table style="width: 400px;" class="data_table vert_scroll_table"> 

似乎沒有工作....幫助嗎?

感謝名單

回答

0

就試試這個:

<table width="400px"> 
0

工作對我來說:JsFiddle Demo

HTML:

<table> 
    <tr> 
     <td>This is a test!</td> 
    </tr> 
</table> 

CSS:

table { width:300px; background-color:blue; } 
+0

真的嗎?....它根本不會改變我 –

+0

ahaha,夥計,那是一年多前... – Phil

+0

哇,謝謝你們!你一年前真的幫過我了<3 – Phil