Howto zoom but not stretch

More
15 years 4 days ago #4450 by patricar
I have several galleries, which size is 660 px width and 300 px height. However, some pics have different proportion and they are redimmensioned to fit that size. Is there an easy way to keep the original height/width proportion?

Please Log in to join the conversation.

More
15 years 3 days ago #4462 by ivan.milic
You can set only one dimension using style or css, the other will be proportional.
example:

If I have :

<img src="logo_w3s.gif" alt="W3Schools.com" height="100" width="100" />

and I want my image height and width 350, then can write like this:

<img src="logo_w3s.gif" alt="W3Schools.com" height="350" />

Please Log in to join the conversation.

Time to create page: 0.193 seconds
Powered by Kunena Forum