Invalid Location of tag (DIV) Error __div

Source: Internet
Author: User

The HTML tags in the JSP file are as follows, prompted in the Eclipse environment: Invalid Location of Tag (DIV).

<a id= "test1" class= "Mitem" href= "#" >
</img>
<div id= "a-in-1" class= "a-in" ><div class= "a-in-m" ></div><div class= "A-in-r" ></div> </div>
</a>

phenomenon: Enter the page under the firefox3.6, or enter the page sometimes the interface shows chaos. But under the ie,firefox3.0 all show normal.

Workaround: replace the <div></div> label under the <a></a> label with <span></span>, as follows:

<a id= "test1" class= "Mitem" href= "#" >
</img>
<span id= "a-in-1" class= "a-in" ><span class= "a-in-m" ></span><span class= "A-in-r" ></span ></span>
</a>

The reason should be that the combination of <a></a> and <div></div> labels causes browser parsing errors

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.