2011-07-11 14 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> 

テーブルの問題

に幅を追加私が試した:働くように見えるdoesntの

 <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

ああ、おい、それは1年以上前だった... – Phil

+0

うわー、ありがとう!あなたは本当に1年前に私を助けました<3 – Phil