⬆️ ⬇️

FF3 rightly punishes for placing a block element inside a string.

I debug the html-layout of another project, created before the advent of Firefox 3. In the code, there are often erroneous constructions like:
  <a href="#">
 <div> Hello, bugs! </ div>
 </a> 
I removed the CSS from the example, but even without it, similar code in Firefox 3 will give a result that the customer would hardly like. Clicking on such a link leads to the appearance of two points in the lower left and upper left corner (this is easy to check on an empty document):







Sometimes such constructions are mistakenly used to create buttons from links. Firefox 2 by default forgives this error - but Firefox 3 is no longer. To avoid this error, you do not need to put the div inside the a tag, you instead need to assign the display:block property to the style of the a tag itself. Block elements (div) inside string (a) are invalid.

')

Update: in this matter , Google itself is not without sin (thanks, uratsakidogi )

Source: https://habr.com/ru/post/38829/



All Articles