html - Overflow Scroll in the table with rows as dropdown -
i have table 1 row each column dropdown many option in it.
i want have overflow-y scroll. tried putting style not happening.
<table id="displaytable" border="5" rules=rows frame=hsides class='border'><tr> <th>value</th> <th>in</th> <th>out</th> </tr> <tr><td> <c:foreach items="${abc}" var="user"> <option value="${user.name}">${user.name}</option><br> </c:foreach> </td> <td> <c:foreach items="${abc}" var="user"> <c:if test="${not fn:containsignorecase(user.name, 'in')}"> <option>x</option><br> </c:if> </c:foreach> </td> <td> <c:foreach items="${abc}" var="user"> <c:if test="${not fn:containsignorecase(user.name, 'out')}"> <option>x</option><br> </c:if> </c:foreach> </td> </tr> </table>
the names can 30-40 want display 15 on screen. rest scroll. tried following css failed.
table.border tr th, table tr td { color: #008bfc; font-size: 14px; font-weight: bold; padding: 8px 10px 9px; text-align: left; } thead.border th { border-right: 1px solid #eeeeee !important; border-top: 2px solid #eeeeee; text-align: left; vertical-align: middle; } #displaytable { width: 50%; height: 400px; overflow-y: scroll; }
i solved this. add <div style="height: 400px; width: 750px; overflow-y: scroll;">
before table.
Comments
Post a Comment