silviasqaurespace Posted July 5 Share Posted July 5 Hello, I'm trying to change the focal point to center for an image inside an accordion. I can't share the site because is hidden. However, this is the code I'm using: li:nth-child(1) .accordion-item__description:before { content:" "; display:block; background-image: url(https://static1.squarespace.com/static/6505228afdd85426284bf7ad/t/66728fe4f00cd419ec25abec/1718783992276/dji_fly_20231105_121652_0012_1699166046586_photo+2+copia.jpg) ; background-size:cover; background-repeat:no-repeat; border-radius: 15px; margin-right:20px; width: 200%; height:130px; } I attach the image of how it looks now. I really need help!!!!! Link to comment
tuanphan Posted July 6 Share Posted July 6 You can use attribute: background-position for example li:nth-child(1) .accordion-item__description:before { content:" "; display:block; background-image: url(https://static1.squarespace.com/static/6505228afdd85426284bf7ad/t/66728fe4f00cd419ec25abec/1718783992276/dji_fly_20231105_121652_0012_1699166046586_photo+2+copia.jpg) ; background-size:cover; background-repeat:no-repeat; border-radius: 15px; margin-right:20px; width: 200%; height:130px; background-position: left center; } 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment