在ul裡面實現把多餘的文字轉化為“...”

不設限發表於2011-12-05
 


在ul裡面實現把多餘的文字轉化為“...”
               <ul id="sliding-navigation" style="margin-top: 45px">
                   
                            <asp:Repeater ID="rptPolicy" runat="server">
                                <ItemTemplate><li>
                                 <div style="width: 180px; height: 20px;
        overflow: hidden; text-overflow:ellipsis"> 
                                    <nobr>
                                    <a href='<%#Eval("ID","Policy.aspx?ID={0}") %>' style="text-decoration:none;color:Black">
                                        <%#Eval("PTYPE")%></a>
                                         </nobr>
                                        </div>
                                        </li>
                                </ItemTemplate>
                            </asp:Repeater>
                           
                        </ul>

在table裡面實現把多餘的文字轉化為“...”


<div style="text-align:left;color:Black">
                    <asp:Repeater ID="rptTitle" runat="server">
                        <HeaderTemplate>
                            <table style="float: left">
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr>
                               <td>
                                <div style="width: 200px; height: 20px;
                        overflow: hidden; text-overflow:ellipsis"> 
                                    <nobr>
                                    <a style="text-decoration:none;color:Black"  href='<%#Eval("ID","PolicyContent.aspx?contID={0}") %>'>
                                        <%#Eval("TITLE")%></a>
                                           </nobr>
                                        </div>
                                </td>
                                <td>
                               <div>
                                    <%#Eval("UPDATETIME")%>
                                    </div>
                                </div>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <FooterTemplate>
                            </table>

 


   

相關文章