VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: hk on January 01, 2019, 15:36:54 PM

Title: Image dimensions
Post by: hk on January 01, 2019, 15:36:54 PM
Hi,

VM 3.2.14 with below Configuration:
Thumbnail Image Width: <blank>
Thumbnail Image Height: 500

I am uploading images of different sizes and in the VM page, the thumbnails are shown but it looks ugly (as attached). Also, the bounding boxes are not even. How can I make the boxes even or add a white space so as to get even sizes of image so that page looks neat.
Title: Re: Image dimensions
Post by: PRO on January 01, 2019, 17:54:09 PM
css min-height the container box.

You could also get the image dimensions with PHP and modify the container via the proportion of the width/height



http://forum.virtuemart.net/index.php?topic=141749.0
Title: Re: Image dimensions
Post by: Studio 42 on January 01, 2019, 19:58:12 PM
Or set a image height with CSS
If you need mobile rules then use height : 100% for eg and height; 500px for desktop
If 500px is uglly then try 200px for eg. for desktop rule
Title: Re: Image dimensions
Post by: GJC Web Design on January 01, 2019, 20:08:30 PM
or why not just make the images all the same size .. seems the obvious thing to me....
Title: Re: Image dimensions
Post by: PRO on January 01, 2019, 20:51:20 PM
You can use irfanview thumbnails batch process to add whitespace, and set to a specific size.

You can also just do this with styling.
Change the image, or change the product container to fixed height.

Title: Re: Image dimensions
Post by: Studio 42 on January 01, 2019, 21:25:20 PM
Or here all solutions with CSS https://codepen.io/matuzo/pen/pjJLBK