Photo collage issue with aspect ratio.

All WYSIWYG Web Builder support issues that are not covered in the forums below.
Forum rules
IMPORTANT NOTE!!

DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.



PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Post Reply
alan_sh
 
 
Posts: 1894
Joined: Tue Jan 01, 2019 5:50 pm

Photo collage issue with aspect ratio.

Post by alan_sh »

I want to have a page with a photo collage of 30+ files. No issue, except that the photos seem to be resized to fit the boxes rather than the other way round. So, the aspect ratios make the photos look too wide or too tall.

A demo file can be found here https://www.dropbox.com/s/n3t733lgm6tin ... e.zip?dl=1. So what have I done wrong?

Alan
User avatar
crispy68
 
 
Posts: 3090
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: Photo collage issue with aspect ratio.

Post by crispy68 »

All of the images in the collage are squares thus the image is being squashed to fit. There is nothing in the extension to change this behavior.

However, CSS crispy68 to the rescue! :mrgreen:

Enter the following between the <head> tags:

Code: Select all

<style>
#PhotoCollage1 .thumbnail img{object-fit:cover;}
</style>
Make sure to change "PhotoCollage1" to match the name of your ID.
alan_sh
 
 
Posts: 1894
Joined: Tue Jan 01, 2019 5:50 pm

Re: Photo collage issue with aspect ratio.

Post by alan_sh »

Thank you. I will try that.

Alan
alan_sh
 
 
Posts: 1894
Joined: Tue Jan 01, 2019 5:50 pm

Re: Photo collage issue with aspect ratio.

Post by alan_sh »

That works just fine. My only issue now is that if I fit it into a layout grid, it goes to full width. There doesn't seem to be any way to set full width=false.

I've fixed it for now by putting in 3 cells in my layout grid and putting the collage in the middle one.

Alan
User avatar
crispy68
 
 
Posts: 3090
Joined: Thu Oct 23, 2014 12:43 am
Location: Acworth, GA
Contact:

Re: Photo collage issue with aspect ratio.

Post by crispy68 »

it goes to full width.
This is correct and intended behavior so it can be flexible. Why didn't you just add a max-width to the grid?
alan_sh
 
 
Posts: 1894
Joined: Tue Jan 01, 2019 5:50 pm

Re: Photo collage issue with aspect ratio.

Post by alan_sh »

Because I didn't think of it (doh!!). Having said that, I actually like it the way I've done it.
Cheers

Alan
Post Reply