The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › let childElement decide fatherElement’s width
http://codepen.io/lrelia/pen/Hwgzi hi,guys.is there any solution make the “.wrap” width the same as img without moving img?
It’s not clear what you are trying to do.
Is is a requirement that the ‘wrap’ be absolutely positioned?
Also…don’t do this
maximum-scale=1.0, user-scalable=no
Here…
http://codepen.io/Paulie-D/pen/Hznpd
I added the padding to the image and removed the div.
or just inline-block
@Mikko Laine
Well yes, of course, but I assumed the positioning was there for a reason.