Jump to content

CSS to make different aspect ratios on separate portfolios for mobile layout

Recommended Posts

Posted

Hi,

I am looking for a custom code so I am able to use different aspect ratios for two different portfolio pages.

I currently have custom code previous (that I got from the forum) so I would have a 3:2 aspect ratio on the "Personal" page and 2:3 Vertical ratio for the "Commissions" page on the desktop layout.

I am just trying to do the same thing for the mobile layout, as the changes seem to be linked by default without CSS. 

Attached here are the aspect ratio settings I would like for the mobile layout.

Thanks in advance!

Screenshot 2024-07-06 at 11.58.26.png

Screenshot 2024-07-06 at 11.57.32.png

  • Replies 3
  • Views 1.1k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Posted
1 hour ago, ywong said:

Hi,

I am looking for a custom code so I am able to use different aspect ratios for two different portfolio pages.

I currently have custom code previous (that I got from the forum) so I would have a 3:2 aspect ratio on the "Personal" page and 2:3 Vertical ratio for the "Commissions" page on the desktop layout.

I am just trying to do the same thing for the mobile layout, as the changes seem to be linked by default without CSS. 

Attached here are the aspect ratio settings I would like for the mobile layout.

Thanks in advance!

Screenshot 2024-07-06 at 11.58.26.png

Screenshot 2024-07-06 at 11.57.32.png

What are the pages URL?

If my comments are useful, please like and mark my solution as answer. It will encourage me. Thanks

MD Rofik
Website Designer and Digital Marketer

Am I helpful? Want to offer me a coffee?
Send me a message if needed any help. I'll try to reply as soon as possible.


 

  • 3 weeks later...
Posted
On 7/24/2024 at 9:34 PM, ywong said:

Hi, the URL is 

https://yilinwong.com/personal  ( 3:2 aspect ratio )

and 

https://yilinwong.com/commissions (2:3 aspect ratio)

Use this code to Website Tools > Custom CSS

#collection-625df62acdcb41459dd3e86f .grid-image {
    padding-bottom: 66.6667% !important;
}
#collection-656899d7287ed249b53abef4 .grid-image {
    padding-bottom: 150% !important;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.