With the help of float: left several divs in a row in a row, and before each of them we will add a button and assign it position: absolute : https://jsfiddle.net/v4xjy9d3/2/
div { width: 10em; height: 10em; float: left; background: linear-gradient(to right, silver, blue); } button { position: absolute; } <button>Button</button> <div></div> <button>Button</button> <div></div> <button>Button</button> <div></div> In chrome, the blocks stand in a row, and the button is superimposed on each of the blocks. But Firefox first placed all the floats, and then, similarly to the text, placed all the buttons after them, one on top of the other. Which browser is right in this case?
PS: How to fix it, I myself know - to wrap each pair in a block with which to set a float. It is interesting to find out which behavior is correct.
