<TD align="center" width="150" height="20" style="overflow: hidden;text-overflow:ellipsis"><A  style="overflow: hidden;text-overflow:ellipsis" href='news.aspx?industryID=<%# DataBinder.Eval(Container.DataItem,"industryID")%>'><%# DataBinder.Eval(Container.DataItem,"title")%></A></TD>
如果指定了宽度
溢出部份隐藏 且显示为……
但是调试 后 不按所设想的显示 
而是全部显示了  怎么办  

解决方案 »

  1.   

    http://community.csdn.net/Expert/TopicView3.asp?id=4973954
      

  2.   

    <TD align="center" width="150" height="20" style="overflow: hidden;text-overflow:ellipsis"><A style="width:150px;height:20px;overflow: hidden;text-overflow:ellipsis" href='news.aspx?industryID=<%# DataBinder.Eval(Container.DataItem,"industryID")%>'><%# DataBinder.Eval(Container.DataItem,"title")%></A></TD>
      

  3.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh">
    <br><br>
    <style>
    .ctl{
       table-layout:fixed
    }
      .ctl td{text-overflow:ellipsis;overflow:hidden;white-space: nowrap;padding:2px}
    </style>
    <center>
    <table cellSpacing="0" cellpadding="1" width="456" class="ctl" border=1>
      <colgroup>
       <col>
       <col width="60">
      </colgroup>
      <tBody>
       <tr>
      <td>标题扩大副教授的士大夫看见似的看来法艰苦但是第十六棵飞机立刻标题扩大副教授的士大夫看见似的看来法艰苦但是第十六棵飞机立刻</td>
      <td>(1/1)</td>
       </tr>
        <tr>
      <td>标题扩大副教授的士大夫看见似的看来法艰苦但是第十六棵飞机立刻标题扩大副教授的士大夫看见似的看来法艰苦但是第十六棵飞机立刻</td>
      <td>(1/1)</td>
       </tr>
       <tr>
      <td>标题扩大副教授的士大夫看见似的看来法艰苦但是第十六棵飞机立刻标题扩大副教授的士大夫看见似的看来法艰苦但是第十六棵飞机立刻</td>
      <td>(1/1)</td>
       </tr>
       <tr>
      <td>标题扩大副教授的士大夫看见似的看来法艰苦但是第十六棵飞机立刻标题扩大副教授的士大夫看见似的看来法艰苦但是第十六棵飞机立刻</td>
      <td>(1/1)</td>
       </tr>
    </tBody>
    </table>
    </html>