Page 1 of 1

How to keep image ratio while resizing?

Posted: Sun Oct 07, 2018 6:36 pm
by nidrig
Hi,

How to keep image ratio while resizing? with css?

I looked at the image popup component but cannot figure it out.

Even if I set the size proportionally, for example: width 79%, height 56%, when the screen is resized, the ratio isn't kept.

Thanks in advance.

Re: How to keep image ratio while resizing?

Posted: Mon Oct 08, 2018 8:16 am
by nidrig
Follow up: I figured out why the ratio was maintained for the pop up image, it's because it's and external image. And apparently, the external image componant takes care of the resizing.

Thus, the solution was to use an external image instead of an embeded one.

Re: How to keep image ratio while resizing?

Posted: Mon Oct 08, 2018 10:19 pm
by Hopki
:D