achristensen Posted April 22, 2021 Share Posted April 22, 2021 Site URL: https://www.andrewjchristensen.com/about Hello! I'm wondering if anyone would know how to make a particular image swap for another image when viewed on mobile. The image in question is the graphic below the body text on this page: andrewjchristensen.com/about (the handwritten initials). I'd like the mobile version to have my full-signature (seen in the top navigation on my desktop site). On mobile the initials appear way too large, and also redundant with my mobile logo image. Any custom-code advice here? Thanks in advance! Beyondspace 1 Link to comment
Beyondspace Posted April 23, 2021 Share Posted April 23, 2021 14 hours ago, achristensen said: Site URL: https://www.andrewjchristensen.com/about Hello! I'm wondering if anyone would know how to make a particular image swap for another image when viewed on mobile. The image in question is the graphic below the body text on this page: andrewjchristensen.com/about (the handwritten initials). I'd like the mobile version to have my full-signature (seen in the top navigation on my desktop site). On mobile the initials appear way too large, and also redundant with my mobile logo image. Any custom-code advice here? Thanks in advance! Could you post both signature image here? I can have some suggestions achristensen 1 BeyondSpace - Squarespace Website Developer 🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox) 🗓️ Delivery Date Picker (Squarespace Date format) 💫 Animated Buttons (Referral URL) 🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations) 🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates) 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
achristensen Posted April 24, 2021 Author Share Posted April 24, 2021 On 4/22/2021 at 11:56 PM, bangank36 said: Could you post both signature image here? I can have some suggestions Sure! I appreciate the help 🙂 Link to comment
tuanphan Posted April 25, 2021 Share Posted April 25, 2021 On 4/22/2021 at 9:40 PM, achristensen said: Site URL: https://www.andrewjchristensen.com/about Hello! I'm wondering if anyone would know how to make a particular image swap for another image when viewed on mobile. The image in question is the graphic below the body text on this page: andrewjchristensen.com/about (the handwritten initials). I'd like the mobile version to have my full-signature (seen in the top navigation on my desktop site). On mobile the initials appear way too large, and also redundant with my mobile logo image. Any custom-code advice here? Thanks in advance! Add to Design > Custom CSS /* Mobile about signature */ @media screen and (max-width:767px) { div#block-yui_3_17_2_1_1615216321733_6156 { background-image: url(https://static1.squarespace.com/static/602ae91739fa1301bf08731d/t/6043889d513b644d69a0dcd9/1616353869049/?format=1500w); background-size: contain; background-repeat: no-repeat; } div#block-yui_3_17_2_1_1615216321733_6156 img { visibility: hidden; } } achristensen 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
achristensen Posted April 25, 2021 Author Share Posted April 25, 2021 9 hours ago, tuanphan said: Add to Design > Custom CSS /* Mobile about signature */ @media screen and (max-width:767px) { div#block-yui_3_17_2_1_1615216321733_6156 { background-image: url(https://static1.squarespace.com/static/602ae91739fa1301bf08731d/t/6043889d513b644d69a0dcd9/1616353869049/?format=1500w); background-size: contain; background-repeat: no-repeat; } div#block-yui_3_17_2_1_1615216321733_6156 img { visibility: hidden; } } This worked! Thanks so much! I'm curious if you might have any idea how to now reduce the space below it... I'm afraid it's just going to be a restriction with Squarespace, as it seems that it inherited the same size bounding box as the initials, which needed to be a taller box, to accomodate the shape of the graphic. When I resize the box in the Squarespace editor for the mobile signature, then it makes the desktop box too short and cuts off the initial graphic. This is something I could live with, but the ideal would be to reduce the space between the social links. Thanks again for this code - I really appreciate it 🙂 Link to comment
tuanphan Posted April 26, 2021 Share Posted April 26, 2021 19 hours ago, achristensen said: This worked! Thanks so much! I'm curious if you might have any idea how to now reduce the space below it... I'm afraid it's just going to be a restriction with Squarespace, as it seems that it inherited the same size bounding box as the initials, which needed to be a taller box, to accomodate the shape of the graphic. When I resize the box in the Squarespace editor for the mobile signature, then it makes the desktop box too short and cuts off the initial graphic. This is something I could live with, but the ideal would be to reduce the space between the social links. Thanks again for this code - I really appreciate it 🙂 Edit above code to this /* Mobile about signature */ @media screen and (max-width:767px) { div#block-yui_3_17_2_1_1615216321733_6156 { background-image: url(https://static1.squarespace.com/static/602ae91739fa1301bf08731d/t/6043889d513b644d69a0dcd9/1616353869049/?format=1500w); background-size: contain; background-repeat: no-repeat; } div#block-yui_3_17_2_1_1615216321733_6156 img { visibility: hidden; } div#block-yui_3_17_2_1_1615216321733_6156 .image-block-wrapper { padding-bottom: 20% !important; } } achristensen 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message How to: Setup Password & Share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care Link to comment
achristensen Posted April 26, 2021 Author Share Posted April 26, 2021 4 hours ago, tuanphan said: Edit above code to this /* Mobile about signature */ @media screen and (max-width:767px) { div#block-yui_3_17_2_1_1615216321733_6156 { background-image: url(https://static1.squarespace.com/static/602ae91739fa1301bf08731d/t/6043889d513b644d69a0dcd9/1616353869049/?format=1500w); background-size: contain; background-repeat: no-repeat; } div#block-yui_3_17_2_1_1615216321733_6156 img { visibility: hidden; } div#block-yui_3_17_2_1_1615216321733_6156 .image-block-wrapper { padding-bottom: 20% !important; } } This worked beautifully! Thank you so much for the help. This is perfect 🙂 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