开发者

Adding width to table problem

 <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${co开发者_Go百科mments.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>

I tried:

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

doesnt seem to work....help please?

thanx


Just try this:

<table width="400px">


Works for me :JsFiddle Demo

HTML:

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

CSS:

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜