PHP in English interception: CSS to solve the problem of Chinese and English mixed title interception

Source: Internet
Author: User
Tags add mixed truncated

Articles in the list, often encountered the title is too long and truncated problem, generally with server-side program truncated, but also need to consider the Chinese and English character width, generally two English meters for a Chinese width. But these can also be done in CSS, especially in IE, you can also add ellipses.

This is the long Chinese title
english 中文版 english

Look at the usage in table again.







<TD nowrap style= "overflow:hidden;text-overflow:ellipsis;" > This is the long Chinese title <TD nowrap style= "overflow:hidden;text-overflow:ellipsis;" >english 中文版 english

Description
Overflow what to do when content overflows, the value hidden to hide overflow content. XHTML 1.0 content, ie, Firefox are supported.
Text-overflow If the value is ellipsis to indicate the content overflow with ellipsis, if the value of clip is simply cut. Non-xhtml1.0 content, only IE 6+ support, that is, Firefox will not add ellipses.
Table-layout table layout, not subject to the changes in the content of the large.
NOBR does not wrap, not XHTML 1.0 content, but IE, Firefox are supported.
nowrap table does not wrap, not XHTML 1.0 content, but IE, Firefox are supported.
This article links http://www.cxybl.com/html/wyzz/CSS/20120601/27375.html

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.