Anchor element not working in firefox and chrome

前端 未结 13 985
甜味超标
甜味超标 2020-12-20 17:36

I have a hyperlink on an image on my client site. It\'s working in IE but when I open the same page in Chrome/Mozilla it\'s not showing the anchor pointer and nothing happen

13条回答
  •  抹茶落季
    2020-12-20 18:23

    Without the full HTML source code, I'll point to that this anchor is nested or after to some element that doesn't have a closing tag.

    Post full HTML source code if this isn't the problem.

    You can find this problem easly by validating your document with:

    • http://validator.w3.org/

    It's the W3C official HTML/XHTML validator, so if some element isn't closed, it'll point which one you need to correct!

    EDIT: After watching your HTML source code posted in answer's comments... where's the document type (DOCTYPE) declaration? You forgot to add it!

    Add this at the beginning of your HTML document:

    
    

    When you don't provide a document type, browsers render web pages in "quircks" mode, which is a compatibility mode that may not render your page as you expected. Learn more about that here:

    • http://en.wikipedia.org/wiki/Quirks_mode

    Let me know if this solves your problem!

提交回复
热议问题