Jump to content

Keep image sizes fixed regardless of the site width (Harris template)

Recommended Posts

Hi guys,

I am trying to ensure than an image stays fixed at the same size regardless of the width of the website. I'm particularly trying to make sure the images do not scale when on mobile.

I would also like to try left align one image and centre align the other image within the block on the page. 

This is the code I have tried but have had no luck getting anything to work yet. I know I am referencing the correct images as I can give them background colours, but adjusting the size and positioning is escaping me.  Any ideas what I can try?

@media only screen and (max-width: 640px){ 
[alt="spacer-left.gif"] { 
  min-width:1400px  !important;
  height:5px !important;
  object-fit: none !important;
  overflow:hidden !important;
}

[alt="spacer-mid.gif"] { 
  min-width:1400px  !important;
  height:5px !important;
  object-fit: none !important;
  overflow:hidden !important;
}
}

Link to comment
  • Replies 0
  • Views 461
  • Created
  • Last Reply

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.