I’m trying to get an image (dynamically placed, with no restrictions on dimensions) to be as wide as its parent div, but only as long as that width isn’t wider than its own
I would use the property display: table-cell
display: table-cell
Here is the link