Jump to content

How to Stop Images from Resizing on Mobile View?

Go to solution Solved by tuanphan,

Recommended Posts

The mobile version of my site page is sizing up these streaming icons, that I'm going to use as links. They are far too big, on the tablet version it still looks good and maintains intended shape/size. The rest of the image resizing being done on the mobile version I like, I just want to keep these streaming icons horizontal.

How can I get just the streaming icons to be sized smaller on the mobile version??

Thanks for any help in advance!

Screen Shot 2022-12-27 at 7.35.15 PM.png

Screen Shot 2022-12-27 at 7.35.48 PM.png

Link to comment
  • Solution
On 12/31/2022 at 10:05 PM, keazeone said:

Woops, my bad thought I had included the URL. 


https://keazemusic.com/kod2

Add to Design > Custom CSS

@media screen and (max-width:767px) {
div#page-63aa54d2dfe53e33bb4c9d9f>.row:nth-child(4)>.span-1 {
    width: 33.333% !important;
    float: left !important;
}
div#page-63aa54d2dfe53e33bb4c9d9f>.row:nth-child(4)>.span-2 {
    width: 66.6667% !important;
    float: left !important;
}
div#page-63aa54d2dfe53e33bb4c9d9f>.row:nth-child(4)>.span-2 .span-1 {
    width: 50% !important;
    float: left !important;
}
}

image.thumb.png.2f699064c08294efeecc654bab1c35e9.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
8 minutes ago, tuanphan said:

Add to Design > Custom CSS

@media screen and (max-width:767px) {
div#page-63aa54d2dfe53e33bb4c9d9f>.row:nth-child(4)>.span-1 {
    width: 33.333% !important;
    float: left !important;
}
div#page-63aa54d2dfe53e33bb4c9d9f>.row:nth-child(4)>.span-2 {
    width: 66.6667% !important;
    float: left !important;
}
div#page-63aa54d2dfe53e33bb4c9d9f>.row:nth-child(4)>.span-2 .span-1 {
    width: 50% !important;
    float: left !important;
}
}

image.thumb.png.2f699064c08294efeecc654bab1c35e9.png

Really appreciate your help and what you do for the forums! Many thanks!

Link to comment
  • 6 months later...

@tuanphan 
Hi, I'm having the same issue. The image (the blue star) is resizing in mobile and it's resizing then I make the webpage smaller.

This is the view:

image.thumb.png.07ab195e7da2dd56366354156d7a272f.png

When I page the webpage screen smaller, this happens:

image.png.d3648317fb85c4e10c5b517335c10de1.png

 

My webpage is: jb-ortho.com

Pass: Twix3

Thanks in advance! 

Edited by JBO
Link to comment
On 7/25/2023 at 8:44 AM, JBO said:

@tuanphan 
Hi, I'm having the same issue. The image (the blue star) is resizing in mobile and it's resizing then I make the webpage smaller.

This is the view:

image.thumb.png.07ab195e7da2dd56366354156d7a272f.png

When I page the webpage screen smaller, this happens:

image.png.d3648317fb85c4e10c5b517335c10de1.png

 

My webpage is: jb-ortho.com

Pass: Twix3

Thanks in advance! 

We can use code to add image after text, so you won't see this problem. What do you think? If you feel okay, you can send me image file, I can give the code

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

Add to Design > Custom CSS

div#block-5732da8c034a5ad9f888 p:after {
    content: "";
    background-image: url(https://content.invisioncic.com/p289038/monthly_2023_07/JStar.png.aabb2910179a46c954128823a10ded06.png);
    display: inline-block;
    width: 30px;
    height: 30px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    position: absolute;
    top: 0
}

 

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

Thank you very much! That worked great for the Home Page. We have that image same image in all of the pages except "contact us". Is there a way to add it to all? I tried to duplicate the image, but it didn't work. 

Much appreciated! 

Link to comment

  

2 hours ago, JBO said:

Thank you very much! That worked great for the Home Page. We have that image same image in all of the pages except "contact us". Is there a way to add it to all? I tried to duplicate the image, but it didn't work. 

Much appreciated! 

div#block-5732da8c034a5ad9f888 is text block id

You can use this tool to find block id

https://chrome.google.com/webstore/detail/squarespace-id-finder/igjamfnifnkmecjidfbdipieoaeghcff

 

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
  • 4 months later...
13 hours ago, Samuel said:

Hi @tuanphan,

I have the same question as the OP, but I'm wondering if you've found any way to target certain images dynamically rather than by counting the number of child elements, since this can easily change as the webpage changes.

It is possible, but it depends on your case (resize image block, section banner image, parallax image...or?) but the way to target will be different.

For example, recently I helped a member, how to automatically target to hide/show images on mobile desktop without having to find the ID manually.

  • We added the text "hideonDesktop", "hideonMobile" to the ALT text of the image, and used JS code to target the ALT text.
  • And if you want to hide any image on mobile/or desktop, just add that text to the ALT of the image

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.