How to make the table of a fixed size, the excess part is displayed as a ellipsis _ experience exchange

Source: Internet
Author: User
How can I set the table to a fixed size? the excess part is shown as a ellipsis

<! Doctype html public "-// W3C // dtd html 4.0 Transitional // EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <style>. ctl {table-layout: fixed }. ctl td {text-overflow: ellipsis; overflow: hidden; white-space: nowrap; padding: 2px} </style> </HEAD> <BODY> <table cellSpacing = "0" cellpadding = "1" width = "100%" class = "ctl" border = 1> <colgroup> <col width = "60"> </colgroup> <tBody> <tr> <td> the title of Dr. Shi of the expanded Associate Professor seems to be hard but 16th planes the title Expanded immediately. The Scholar-doctor of the Associate Professor saw it as difficult as he saw it, but the 16th planes immediately </td> <td> (1/1) </td> </tr> <td> the title of Dr. Shi, the title of the expanded Associate Professor, seems to be difficult, but the title of the 16th plane immediately expands the title of the Associate Professor's doctor. 16th planes </td> <td> (1/1) </td> </tr> <td> the title of Dr. Shi, the title of the expanded Associate Professor, seems to be difficult, but the title of the 16th plane immediately expands the title of the Associate Professor's doctor. 16th planes </td> <td> (1/1) </td> </tr> <td> the title of Dr. Shi, the title of the expanded Associate Professor, seems to be difficult, but the title of the 16th plane immediately expands the title of the Associate Professor's doctor. 16th planes </td> <td> (1/1) </td> </tr> </tBody> </table> </BODY> </HTML>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]


If

Or
  • How can this problem be solved?

    <! Doctype html public "-// W3C // dtd html 4.0 Transitional // EN"> <HTML> <HEAD> <TITLE> New Document </TITLE> <style>. ctl {text-overflow: ellipsis; overflow: hidden; white-space: nowrap; padding: 2px} </style> </HEAD> <BODY> <p class = "ctl" style = "width: 234; height: 99; background: cyan; "> the title of the expanded associate professor's scholar doctor seems to be difficult, but the title of the 16th plane immediately expanded the title of the Associate Professor's scholar doctor saw it as difficult, but the 16th planes immediately </p> <ul class = "ctl" style = "width: 234; "> <li> the title of the expanded associate professor's scholar doctor seems to be difficult, but the title of the 16th plane immediately expanded the title of the Associate Professor's scholar doctor. It seems like the method is hard, but the 16th planes immediately </li> <li> the title of the expanded associate professor's scholar doctor seems to be difficult, but the title of the 16th plane immediately expanded the title of the Associate Professor's scholar doctor saw it as difficult, but the 16th planes immediately </li> </ul> </BODY>
    [Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]



    Text-overflow: ellipsis;

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.