TD nowrap CSS NoWrap Use of notes _ experience Exchange

Source: Internet
Author: User
Ask a question:
<TD width= "28%" align= "right" nowrap >
I set the nowrap and do not set the nowrap effect all the same. Is that the form 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 in effect.
If the TD width is set, the NoWrap property does not work.

Sample file, click the Run button to see the effect:
<ptml> <pead> <title>www.jb51.net Wrap properties of cloud-dwelling community </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 more strong, wear-resistant ......</p> <p> cells do not set the NoWrap property of the empty table:</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 that I actually have a very resilient life, it's much stronger than I thought it would be, wear-resistant ......</td> </tr> </table> <p> Cells set the NoWrap property, and the Width property is not set:< /p> <table width= "border=" 1 "cellspacing=" 0 "cellpadding=" 0 "> <tr> <td nowrap> I finally understand that I actually have a toughness Full of life, it's much stronger than I thought it would be, wear-resistant ......</td> </tr> </table> <p> Cells set the NoWrap property, and also set the Width property:</p> <table width= "1" border= "C"ellspacing= "0" cellpadding= "0" > <tr> <td width= "nowrap>" I finally understand, I actually have a toughness of life, it is far more than I imagined that the life is much stronger, wear more ... ...</td> <td> </td> </tr> </table> </body> </ptml>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
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.