The line feed is displayed when the li element is floating on the right, and the line feed is floating on the li element.
The line feed will appear when the li element is right floating:
In general, if you want to display block-level elements in one row, you can apply a floating value to the elements, but sometimes it is not as expected, and a line break may occur.
See the following code:
<! DOCTYPE html>
In the above Code, although the li on the right uses a float on the right, there is still a line break. The following describes the solution:
Solution:
The li element on the left is also floating. The code is modified as follows:
<Ul id = "box"> <li style = "float: left"> </li> <li style = "float: right"> </li> </ul>
The original address is: http://www.softwhy.com/forum.php? Mod = viewthread & tid = 9738.
For more information, see: http://www.softwhy.com/divcss/