Jump to content

Resize media image and text on mobile only

Recommended Posts

  • Replies 8
  • Views 533
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

On 9/30/2024 at 9:38 PM, NOAHCRED said:

Once you find the block ID, how do you adjust the code to apply to the entire portfolio of images for that section? I am able to adjust single images but not the entire scroll through. I appreciate all the help 

You can replace ID in the code with Page ID

When use tool, you will see an ID in the top of page, it is Page ID

Or if you want to target images belong specific section only, use section[data-section-id="..."] (use the tool, you can see this ID)

image.png.8cb04922f5ce0ff5c7dbb948a05e0d40.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

That doesn't seem to be working for me. I used the following code and the images in the gallery are still showing up as the same size:

@media screen and (max-width:767px) {
div#section-66e068e8c9e0ef3ef3553fde img {
    object-fit: contain !important;
}

Link to comment
On 10/3/2024 at 10:05 PM, NOAHCRED said:

That doesn't seem to be working for me. I used the following code and the images in the gallery are still showing up as the same size:

@media screen and (max-width:767px) {
div#section-66e068e8c9e0ef3ef3553fde img {
    object-fit: contain !important;
}

You need 2 symbols }} at the end

 

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.