Use Text-align:justify to justify an example _ experience Exchange

Source: Internet
Author: User
Text-align:justify can only be justified on a non-final line in multiple rows. For a single line of their own no way, IE has text-justify can solve the problem, the non-ie of my way to compare garbage, because only in special occasions will be used.

Example Source Code [www.52css.com]
. justify{
Height:1.1em;
Overflow:hidden;
text-align:justify;
Text-justify:d Istribute-all-lines;
}
Div.cn:after {
Content: "__________________________________________";
font-size:100px;
}
On the non-IE I use the content also increases the contents to the second line, before the first line is justified.

However, each browser does not have the same understanding of Chinese. Firefox is the direct segmentation of Chinese, opera will not be divided into Chinese, only recognize the space, if the Chinese middle of the half-width of the English or the label it will be misaligned, Safari close to opera. There is no space to divide.

English is better, because everyone can only use the space to divide the word, but IE with text-justify:d istribute-all-lines to divide really ugly is deadly. Originally wanted to use HTC or JS to help IE, but found that IE6 good stupid said, home no IE7 do not know how.

Or knock the space is a better way, can be firefox this only enlarged text browser a magnified text on XX, I write that rotten method also only in certain circumstances useful, think of a word: Cherish life, away from firefix!
  • 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.