As I understand it, "em" isn't a absolute unit, it's a relative unit. So, I mean, I guess it's as natural as any other em value.
Regarding max-width, the issue is that setting it at 100% means that the image will appear to stretch vertically if the screen width is too narrow relative to the defined height. See the attached images: test1 has a viewing window that accomodates both the defined 4em height and the proportionally scaled width; test2 shows what happens when the viewing window is narrower than a 4em height and a proportional width would allow—namely, it preserves the height and squishes it width-wise to fit it all on the screen.
Last edited by ElMiko; 09-28-2025 at 01:49 PM.
|