Firefox rendering HTML incorrect sometimes

后端 未结 4 982
暗喜
暗喜 2021-01-21 13:11

I developed a css menu and it has worked fine across all browsers in my testing (pure html/css). When we brought the code into our development environment which is running on ca

4条回答
  •  日久生厌
    2021-01-21 13:46

    You are not allowed to have a div inside a link. Firefox automatically corrects this the way it thinks you meant it to be. Of course a machine can't really guess what it is you tried, so it 'bugs out'

    In fact, apparently FireFox is the only browser that even sees that you made a mistake. The other browsers just ignore your improper HTML.

    Try removing the div, and just give the a display:block property in the stylesheet.

提交回复
热议问题