


Spaces The display distance is inconsistent in IE, Firefox, and Chrome browsers_HTML/Xhtml_Webpage Production
The display effect on IE, Firefox, and Chrome browsers is different, mainly because the width of the preceding space is different.
Online information says
Different browsers will have different default fonts. Generally, the default font of IE is Song Dynasty, while the default font of firefox and chrome is Times New Roman,
Song Dynasty is a font with constant width characters, but Times New Roman is not a font with constant width characters. Because the default fonts of browsers are different, the display width of
space characters is also different in different browsers.
For example, the following code is tested with IE and chrome respectively
I am the first row |
nbsp;nbsp;nbsp;nbsp;I am the second row |
nbsp;nbsp ;nbsp;nbsp;nbsp;nbsp;I am the third row |
The display effect in chrome is as follows:

The display effect under IE9 is as follows:

It can be seen that two occupy the width of one Chinese character in chrome, while four only occupy the width of one Chinese character in IE The width of a Chinese character.
Solution:
1. Modify the encoding format of the page
and the compilation method of the page (in myeclipse)

Then right-click IE to modify the encoding display format

2. (Recommended) Set the font in the space line and put Just set the font to any font with equally spaced characters.
For example:
PS: nbsp;Replace with

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

MySQL A space is a special character used to separate keywords, identifiers, values, and other statement elements. Spaces can be used in multiple locations in a SQL statement and usually do not affect the execution of the statement. The purpose of spaces: 1. Used to separate keywords and identifiers; 2. Used to separate operators and values; 3. Used to separate functions, columns and table aliases; 4. Used for indentation and alignment.

The difference between full-width spaces and half-width spaces. When we use word processing software or edit text content, we sometimes encounter the concept of spaces. Space is a very basic element in typesetting and formatting text, but many people may not know the difference between full-width spaces and half-width spaces. In daily use, we may feel that full-width spaces and half-width spaces have different effects in different situations, but we may not be aware of the subtle differences. First of all, the difference between full-width spaces and half-width spaces is the width they occupy.

Go language is a simple, efficient, and highly concurrency programming language. It is an open source language developed by Google. In the Go language, the use of spaces is very important, it can improve the readability and maintainability of the code. This article will introduce how to use spaces correctly in Go language and provide specific code examples. Why you need to use spaces correctly In the programming process, the use of spaces is very important for the readability and beauty of the code. Appropriate use of spaces can make code clearer and easier to read, thus reducing

How to replace spaces in Vue: 1. Create a Vue sample file; 2. Replace all spaces through the regular expression "string = string.replace(/\s/g," ");"; 3. Through "console. log(string);" just output the replaced string.

Differences: 1. The display width of full-width spaces is the same as that of Chinese characters, occupying two bytes. You need to use the Chinese input method when inputting, while the width of half-width spaces is half that of Chinese characters, occupying one byte, just press the space key. Can be input; 2. When typesetting text, full-width spaces make the layout more relaxed, while half-width spaces make the layout more compact.

Title: Sharing practical techniques for replacing spaces in Golang. With the popularity and development of the Internet, program design and development have become more and more important. In the programming process, data processing is a very critical part. When processing text data, you often encounter situations where you need to replace spaces. This article will share how to implement the technology of replacing spaces in Golang and provide specific code examples. Why do I need to replace spaces? Spaces are one of the common special characters in text data. Sometimes we need to replace spaces with other characters or remove spaces.

How to remove spaces at both ends of a string in PHP: 1. Directly use the trim() function to remove spaces at both ends. This function can remove whitespace characters or other predefined characters on both sides of a string. The syntax is "trim(string)"; 2. . Use the trtrim() and ltrim() functions to remove whitespace characters or other predefined characters on the right and left sides of the string respectively. The syntax is "rtrim(ltrim(string))".

How to remove consecutive spaces in PHP: 1. Create a PHP sample file; 2. Use the "strip_tags()" function to strip the HTML, XML and PHP tags in the string; 3. Implement it through the "str_replace" and "preg_replace" functions Just delete the consecutive spaces.
