TD nowrap CSS NoWrap Use instructions for notes _ experience Exchange

Source: Internet
Author: User
Ask questions:

I set nowrap and do not set nowrap effect are the same. Is that the table automatically stretches with the text, why?

→ Answer the question:
The behavior of the TD element NoWrap property is related to the width property of the TD element.

If the TD width is not set, the NoWrap property is working.
If the TD width is set, the NoWrap property is not functional.

Sample file, click the Run button to see the effect:
<ptml> <pead> <title>www.jb51.net Script House Wrap Properties Research </title> <meta http-equiv= "Content-type" Content= "text/html; charset=gb2312 "> </pead> <body bgcolor=" #FFFFFF "text=" #000000 "> <p> test String:</p> <p> I finally understand, I actually have a toughness of life, it is far more than I imagined the life of a much stronger, more wear-resistant ......</p> <p> cell not set empty table for NoWrap property:</p> <table width= "100" Border= "1" cellspacing= "0" cellpadding= "0" > <tr> <td> </td> </tr> </table> <p> Add test string:</p> <table width= "border=" 1 "cellspacing=" 0 "cellpadding=" 0 "> <tr> <td> I finally understand, I actually have a tough life, it is far more solid than I thought the life, wear-resistant more ......</td> </tr> </table> <p> Cells set the NoWrap property, the Width property is not set:< /p> <table width= "border=" 1 "cellspacing=" 0 "cellpadding=" 0 "> <tr> <td nowrap> I finally understand, I actually have a tough life, it is far more solid than I thought the life, wear-resistant multi-......</td> </tr> </table> <p> Cells set the NoWrap property, also set the Width property: </p> <table width= "border=" 1 "cellspacing=" 0 "cellpadding=" 0"> <tr> <td width=" nowrap> "I finally understand that I actually have a tough life, it is far more than I imagined the life of a much stronger, more wear-resistant ......</td> <td> </ td> </tr> </table> </body> </ptml>
[Ctrl + A full selection Note: If you need to introduce external JS need to refresh to execute]
  • Related Article

    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.