Jump to content

Looking for a way to resize image/button differently in mobile

Go to solution Solved by Jardena,

Recommended Posts

Hi all! 

I built a website for this non-profit, and am using images as buttons on the homepage in order to create a graphic look and link to the three main actions they are expecting visitors to the site will want to do. However, because I've made these buttons as images with embedded links, their size looks strange on mobile (too big and out of proportion with the first graphic on the site). Is there something that I can do to make these size differently on desktop vs mobile?

They are using 7.0 and the Tudor template.

Your help is so appreciated-- as well as any other feedback you might have for me!

Screen Shot 2022-12-12 at 4.59.49 PM.png

Screen Shot 2022-12-12 at 5.00.05 PM.png

Link to comment

Try adding to Design > Custom CSS

/* resize image buttons on mobile */
@media screen and (max-width:640px) {
div#page-62f41e53d725db489dde5edb>.row:nth-child(2) .has-aspect-ratio {
    padding-bottom: 50% !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!)

Link to comment
  • 2 weeks later...
  • 2 weeks later...

Hi @tuanphan! Thank you so much for your help. No, unfortunately, it didn't resolve the issue- sorry for the confusion. 

I switched the images to buttons in an effort to help with resizing on mobile, but now am dealing with an issue of the buttons being different sizes and that impacting the spacing. Is there a way to make the buttons on this webpage a uniform size (or ratio, so they resize well on mobile) instead of having the size be impacted by the length of text?

Again, we are looking at this webpage -- www.sparksandwirycries.org

Link to comment
2 hours ago, Jardena said:

Hi @tuanphan! Thank you so much for your help. No, unfortunately, it didn't resolve the issue- sorry for the confusion. 

I switched the images to buttons in an effort to help with resizing on mobile, but now am dealing with an issue of the buttons being different sizes and that impacting the spacing. Is there a way to make the buttons on this webpage a uniform size (or ratio, so they resize well on mobile) instead of having the size be impacted by the length of text?

Again, we are looking at this webpage -- www.sparksandwirycries.org

Hi,

It looks same size to me

image.thumb.png.f3e86ba399e7abc49c20cd3400e0eb97.png

image.thumb.png.3e47902db9298cd5c34c2469a2eeb3fa.png

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!)

Link to comment

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.