Problems with inconsistent results in different browsers with hollow lattice display (mainly width inconsistency)

Source: Internet
Author: User

<div>&nbsp;&nbsp;abc</div>

In IE, Firefox, Chrome browser display the effect is not the same, mainly the front of the space width is different.

On the Internet to check the information, it is probably the meaning of:

Different browsers will have different default fonts, general IE default fonts are Arial, and Firefox and chrome default font is times New Roman, Arial is a character, such as wide font, but Times New Roman is not a character width font, Because the browser's default font is different, the space character &nbsp; display width under different browsers is different.

Workaround: Set the font in the blank line, set the font to any one of the characters, such as the spacing of the font on the line.

such as: <div style= "font-family: ' Song body ';" >&nbsp;&nbsp;abc</div>

Problems with inconsistent results in different browsers with hollow lattice display (mainly width inconsistency)

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.