Use CSS to solve table text overflow control TD display Word Count

Source: Internet
Author: User

  1. Scene:

    The left side of the column I can't let him change the line, how to do?

    Here is the workaround:

    [Plain]View PlainCopy
      1. table{
      2. width:100px;
      3. table-layout:fixed;/* only the table-defined layout algorithm is fixed, the following TD definition will work. */
      4. }
      5. td{
      6. width:100%;
      7. word-break:keep-all;/* does not change the line */
      8. white-space:nowrap;/* does not change the line */
      9. overflow:hidden;/* content is hidden when content is out of width */
      10. text-overflow:ellipsis;/* display ellipsis (...) when text inside an object overflows; use with overflow:hidden; */
      11. }

    Reference: http://www.52design.com/html/201007/design201071123721.shtml

    Right now:

Use CSS to resolve table text overflow control TD display word Count

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.