Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to solve the problem of inserting an element into DD DT under IE7 and displaying the result list step by step to the left?

2025-01-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

How to solve the problem of inserting an element in DD DT under IE7, the result list shows step by step to the left, many beginners are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, hope you can get something.

Today, I came across a strange BUG in the project. I added a tag between the DD,DT. The list of results shows that it moves to the left step by step, and the style deviates. The code is as follows.

The code is as follows:

After the tag was deleted, the display was normal. Later, I checked it on the Internet. The possible reasons are:

According to the HTML4.01 specification, LI DD DT elements should only exist in their corresponding UL OL DL elements, while lists created by UL OL DL elements should not contain non-list elements with other meanings ('display' is not' list-item') by definition of the HTML specification, but in practice, it is common to encounter things such as DIV SPAN or even text content being placed after LI elements.

This phenomenon has nothing to do with the type of non-list element inserted after the LI DT DD element, or with the type that contains the LI DD DT element. From the parsed HTML code obtained by the browser, we can see that IE6 IE7 IE8 (Q) ignores the closing tag of the LI DD DT element, and the LI elements located in the same parent element are connected back and forth in the document tree.

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report