2009. 5. 8. 16:35

<div style="width:200; text-overflow:clip; overflow:hidden;">
    <nobr>제목이 긴 문자열로 이루어진 글을 테이블의 폭에 알맞게 잘라줍니다.</nobr>
</div>
<div style="width:200; text-overflow:ellipsis; overflow:hidden;">
    <nobr>제목이 긴 문자열로 이루어진 글을 테이블의 폭에 알맞게 잘라줍니다.</nobr>
</div>
<div style="width:200; text-overflow:ellipsis; overflow:visible;">
   <nobr>제목이 긴 문자열로 이루어진 글을 테이블의 폭에 알맞게 잘라줍니다.</nobr>
</div>
<table border=1>
  <tr style="padding-top:3">
    <td height=20 style="padding-left:5"><div style="overflow:hidden; text-overflow:ellipsis; width:220;"><nobr><a href="">제목이 긴 문자열로 이루어진 글을 테이블의 폭에 알맞게 잘라줍니다.</nobr></div></td>
    <td class=s>2006.12.26</td>
  </tr>
</table>

 

 

 

<style type="text/css">
.fixed table { table-layout : fixed; }
.fixed table tr td { text-overflow : ellipsis; overflow : hidden; }
</style>

<div class="fixed">
<table cellpadding="0px" cellspacing="0px" border="1px">
<tr>

<td width="2%">

<nobr>a234234234234234234234234234234qwreqwer</nobr></td>

<td width="3%">234234234</td>

<td width="95%">test</td></tr>
<tr>

<td>b</td>

<td>lekjalefjlaejiflaejflajeflajefljaaa</td>

<td>xxx</td></tr>
</table>
</div>

Posted by 굿데이