html - CSS wrapping and hiding text within a table -
i've searched other answers , none of them seem produce desired results looking for.
here table: (removed , added rendered html @ bottom.)
currently isn't wrapping text table looks nice , clean. have long procedures names , table pushed off page.
what want happen if name longer width of cell hides text.
i want procedure have width constrains.
edit adding rendered html:
i have added no additional css project outside of included in asp.net mvc4 starter template.
<table style="width: 100%; white-space: nowrap; overflow: hidden;"> <tbody><tr> <th> department </th> <th> function </th> <th> process </th> <th style="max-width: 75px;"> procedure </th> <th> </th> </tr> <tr> <td>legal process</td> <td>setup , maintenance</td> <td>new placement scrub</td> <td>review of newly placed accounts determine if there missing information or incorrect information before collection efforts begun</td> <td align="center"><a href="/masterlist/details/1">details</a></td> </tr> <tr> <td>legal process</td> <td>setup , maintenance</td> <td>685 queue/ midland chargeoff balance issue</td> <td>review , correction of midland accounts placed differing charge off , current principal balances</td> <td align="center"><a href="/masterlist/details/2">details</a></td> </tr> <tr> <td>legal process</td> <td>lawsuit , judgment process</td> <td>skip trace</td> <td>re-serve request ca</td> <td align="center"><a href="/masterlist/details/3">details</a></td> </tr> <tr> <td>legal process</td> <td>lawsuit , judgment process</td> <td>skip trace</td> <td>re-serve request id</td> <td align="center"><a href="/masterlist/details/4">details</a></td> </tr> <tr> <td>legal process</td> <td>lawsuit , judgment process</td> <td>suit referral</td> <td>barclays suit referral</td> <td align="center"><a href="/masterlist/details/5">details</a></td> </tr> <tr> <td>legal process</td> <td>lawsuit , judgment process</td> <td>suit referral</td> <td>capital 1 crs procedure</td> <td align="center"><a href="/masterlist/details/6">details</a></td> </tr> <tr> <td>litigation support</td> <td>admin mailroom & doc production</td> <td>oregon ten day demand letter</td> <td>ten day demand letter sent debtor</td> <td align="center"><a href="/masterlist/details/7">details</a></td> </tr> <tr> <td>litigation support</td> <td>admin mailroom & doc production</td> <td>oregon debtor exam</td> <td>debtor exam forwarded court issuing</td> <td align="center"><a href="/masterlist/details/8">details</a></td> </tr> <tr> <td>litigation support</td> <td>admin mailroom & doc production</td> <td>oregon debtor exam</td> <td>debtor exam returned court , forwarded process server service</td> <td align="center"><a href="/masterlist/details/9">details</a></td> </tr> <tr> <td>litigation support</td> <td>lawsuit , judgment process</td> <td>oregon subpoena </td> <td>subpoena forwarded process server service</td> <td align="center"><a href="/masterlist/details/10">details</a></td> </tr> <tr> <td>finance</td> <td>h/r - payroll</td> <td>benefits</td> <td>benefits signup</td> <td align="center"><a href="/masterlist/details/11">details</a></td> </tr> <tr> <td>finance</td> <td>h/r - payroll</td> <td>benefits</td> <td>benefits summary</td> <td align="center"><a href="/masterlist/details/12">details</a></td> </tr> <tr> <td>finance</td> <td>h/r - payroll</td> <td>new hire</td> <td>background check</td> <td align="center"><a href="/masterlist/details/13">details</a></td> </tr> <tr> <td>finance</td> <td>h/r - payroll</td> <td>new hire</td> <td>isi orientation - drug test</td> <td align="center"><a href="/masterlist/details/14">details</a></td> </tr> <tr> <td>finance</td> <td>processing</td> <td>client remittances</td> <td>asset acceptance remit</td> <td align="center"><a href="/masterlist/details/15">details</a></td> </tr> <tr> <td>finance</td> <td>processing</td> <td>client remittances</td> <td>end of month remits</td> <td align="center"><a href="/masterlist/details/16">details</a></td> </tr> <tr> <td>finance</td> <td>processing</td> <td>cost audits</td> <td>internal cost audits</td> <td align="center"><a href="/masterlist/details/17">details</a></td> </tr> <tr> <td>finance</td> <td>processing</td> <td>cost audits</td> <td>weekly cost duplicates</td> <td align="center"><a href="/masterlist/details/18">details</a></td> </tr> </tbody></table>
if can add class each "procedure" column (and header, well), so:
<tr> <td>litigation support</td> <td>admin mailroom & doc production</td> <td>oregon debtor exam</td> <td class="proc">debtor exam forwarded court issuing</td> <td align="center"><a href="/masterlist/details/8">details</a></td> </tr>
you can reign text in so:
.proc { overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
see http://codepen.io/paulroub/pen/rvlnb example
Comments
Post a Comment