Jump to content

Positioning Background image

Recommended Posts

  • Replies 3
  • Views 1.5k
  • Created
  • Last Reply
  • 2 weeks later...

The background images are not actually background images. They are images inside a div with a class of background image. 

I was able to reposition my background image to position at the top of the section using object-position.

.section-background img {
  object-position: 50% 0 !important;
}

I can NOT, however figure out how to target a specific background image. I see id's assigned in the JS, but haven't figured out if we can use those to target an image. 

Can you help!?!?!?

 

556692242_ScreenShot2021-03-05at2_17_27PM.png.80d63f0d8c96367c2381338e19c98ba7.png

Link to comment
On 3/6/2021 at 4:18 AM, julie-b said:

The background images are not actually background images. They are images inside a div with a class of background image. 

I was able to reposition my background image to position at the top of the section using object-position.


.section-background img {
  object-position: 50% 0 !important;
}

I can NOT, however figure out how to target a specific background image. I see id's assigned in the JS, but haven't figured out if we can use those to target an image. 

Can you help!?!?!?

 

556692242_ScreenShot2021-03-05at2_17_27PM.png.80d63f0d8c96367c2381338e19c98ba7.png

You can target data-section-id

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

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.