HaleyWard Posted November 3, 2022 Share Posted November 3, 2022 I can't seem to figure out how to add either a triangle background image or pseudo element that overlaps from one section to the next. I've attached an image of my homepage site design in Adobe XD, but I can't execute it on SS. The best I could do is manipulate the background image's overlay to form a triangle but it doesn't overlap with the next section. I attached the triangle I was trying to use to create the effect. Background overlay: section[data-section-id="63640eedfa630e7109f0410e"] { .section-background-overlay { background:linear-gradient(-45deg, transparent 50%, #fff 50%); z-index:1; opacity:.9!important; } } Here, I was able to get the triangle to show up as a background image and overlap with the next section, but it appears cut off and I'm not sure why. Background image: section[data-section-id="63640eedfa630e7109f0410e"]::after { content:''; background-image: url(https://static1.squarespace.com/static/63640ed0871b36563fa4c917/t/636431a8d4cb4d1fa7e3f8c5/1667510696435/triangle-2.png); position:absolute; width:100%; height:100%; z-index:1; } URL: https://chanceanddacompany.squarespace.com/ Password: construction Link to comment
Beyondspace Posted November 3, 2022 Share Posted November 3, 2022 2 hours ago, HaleyWard said: I can't seem to figure out how to add either a triangle background image or pseudo element that overlaps from one section to the next. I've attached an image of my homepage site design in Adobe XD, but I can't execute it on SS. The best I could do is manipulate the background image's overlay to form a triangle but it doesn't overlap with the next section. I attached the triangle I was trying to use to create the effect. Background overlay: section[data-section-id="63640eedfa630e7109f0410e"] { .section-background-overlay { background:linear-gradient(-45deg, transparent 50%, #fff 50%); z-index:1; opacity:.9!important; } } Here, I was able to get the triangle to show up as a background image and overlap with the next section, but it appears cut off and I'm not sure why. Background image: section[data-section-id="63640eedfa630e7109f0410e"]::after { content:''; background-image: url(https://static1.squarespace.com/static/63640ed0871b36563fa4c917/t/636431a8d4cb4d1fa7e3f8c5/1667510696435/triangle-2.png); position:absolute; width:100%; height:100%; z-index:1; } URL: https://chanceanddacompany.squarespace.com/ Password: construction Can you check the background image of triangle? It does not fit the image and the triangle is not at top and left BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox - Lightbox captions only mode) 🗓️ Delivery Date Picker (Squarespace Date picker form field) 💫 Gallery block 7.1 workaround 🥳 No-code customisations for Squarespace 🚀 Learn how to rank new pages on Google in 48 hours! If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you! Link to comment
HaleyWard Posted November 4, 2022 Author Share Posted November 4, 2022 If I code the triangle to be positioned in the upper left corner it's still cut off. What do you suggest? Link to comment
tuanphan Posted November 6, 2022 Share Posted November 6, 2022 On 11/4/2022 at 6:18 PM, HaleyWard said: If I code the triangle to be positioned in the upper left corner it's still cut off. What do you suggest? Remove space inside image then use this new code section[data-section-id="63640eedfa630e7109f0410e"]::after { content: ''; background-image: url(https://static1.squarespace.com/static/63640ed0871b36563fa4c917/t/636431a8d4cb4d1fa7e3f8c5/1667510696435/triangle-2.png); position: absolute; width: 100%; height: 100%; bottom: 0; top: 0; z-index: 999999; left: 0; background-size: contain; background-repeat: no-repeat; background-position: left; } 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
HaleyWard Posted November 6, 2022 Author Share Posted November 6, 2022 Thank you, tuanphan! This is the code that worked for me: section[data-section-id="63640eedfa630e7109f0410e"]::after { content: ''; background-image: url(https://static1.squarespace.com/static/63640ed0871b36563fa4c917/t/63684929504397688b46a951/1667778857478/triangle.png); position: absolute; width: 150%; height: 150%; bottom: 0; top: -15vh; z-index: 1; left: -8vw; background-size: contain; background-repeat: no-repeat; background-position: left; } tuanphan 1 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