Solution to large line spacing (5 pixels more in IE)

Solution to large line spacing (5 pixels more in IE)

Copy code
The code is as follows:

li {width:300px; height:23px; line-height:24px:}
<ul>
<li>Large line spacing</li>
<li>Large line spacing</li>
<li>Large line spacing</li>
<ul>

After the above definition, the line spacing of li should be 23px, but IE is 28px, 5 pixels more. The reason is unknown. The solution is as follows (red means the test is OK):
1. The solution to the problem of blank line spacing in li under IE5: If the width of li is defined, then vertical-align: bottom; needs to be defined in li.
2. It is best not to define the width in UL, but in the DIV outside LI or UL.
3. The best way to write LI is to write the height and width, as well as vertical-align: bottom; in li (for ie5/win bug), or add a div outside ul and define the width. Then you don’t need to define the width and vertical-align: bottom; in li, and it will display normally (no blank line spacing will be generated under IE5), but the height still needs to be defined.

<<:  Differences between FLOW CHART and UI FLOW

>>:  Solution to the problem that Xshell cannot connect to the virtualBox virtual machine

Recommend

Nginx one domain name to access multiple projects method example

Background Recently, I encountered such a problem...

Example of cross-database query in MySQL

Preface In MySQL, cross-database queries are main...

Summary of Spring Boot Docker packaging tools

Table of contents Spring Boot Docker spring-boot-...

Detailed example of jQuery's chain programming style

The implementation principle of chain programming...

Solution to Mysql binlog log file being too large

Table of contents 1. Related binlog configuration...

Explanation of MySQL performance inspection through show processlist command

The show processlist command is very useful. Some...

Learn more about MySQL indexes

1. Indexing principle Indexes are used to quickly...

Detailed steps for installing nodejs environment and path configuration in Linux

There are two ways to install nodejs in linux. On...

Detailed explanation of the Docker deployment tutorial for Jenkins beginners

This article deploys Jenkins+Maven+SVN+Tomcat thr...

Detailed explanation of the difference between Vue life cycle

Life cycle classification Each component of vue i...

Docker installs the official Redis image and enables password authentication

Reference: Docker official redis documentation 1....

Tutorial on using Multitail command on Linux

MultiTail is a software used to monitor multiple ...

Methods and techniques for quickly displaying web page images

1. Use .gifs rather than .jpgs. GIFs are smaller ...