Hello.
We need a very complex structure of something like a tile product. Impose it turns out, but collapses in Firefox. I ask for advice. Thank!
The tile of the goods should be proportional: change the height depending on the width. Let's set this proportionality through padding-bottom: 50%;
Inside, respectively, absolutely positioned context:
position: absolute; left: 0; top: 0; right: 0; bottom: 0; We get the necessary proportionally changing context: https://jsfiddle.net/u7ab3ezo/
The picture inside should be 100% of the height of this container and centered. Make an img tag with height: 100%; and so far, too, everything is OK: https://jsfiddle.net/u7ab3ezo/4/
But now you need to hang a badge on the picture with a discount in the upper right corner, a bottom price and so on. This should be done exactly along the borders of the picture. To do this, try to wrap the image in inline-block with position: relative : https://jsfiddle.net/u7ab3ezo/5/
In Chrome, it turns out as it should: 
In Firefox, this wrapping inline box (blue) is decomposed as if the picture had not been scaled: 
If you pull the width of the screen in Firefox, everything is really bad, the picture flies out of the screen at all. For the sake of fairness, I will say that the blue background also appears in chrome when the window is resized, but when you update / open the page, nevertheless, everything is fine.
Tried to wrap in inline-flex, in the table - does not help. It helps to wrap in inline, but then the blue area is not obtained according to the height of the picture, but along the line-height line and you can’t throw anything into the upper corners.
Tell me, please, can I finish this option somehow? Maybe you can wrap the picture inline, which will be 100% of the height of the picture? Or is the wrapper somehow absolutely positioned?
UPD1: As a result, my card should look like this. There are more complex proportionality calculations, more complex positioning from indents, but inside lies the problem described above. 
UPD2: Simplified and working version of this wrapper: https://jsfiddle.net/0v8whtrf/ In this case, Firefox behaves the same way as other browsers, tupit only when resize. When you open the page - he is good. The problems begin when I put this thing in some extreme content-type proportional tile.


preview-wrapalso works crookedly in other browsers, because they live different lives with the picture, I think it’s better to make another option, but for this you need a more detailed description of what the discount is and how you plan to display it, you can try itafterhave an image do - MasterAlex