byandreavaldes Posted September 7, 2023 Share Posted September 7, 2023 Hello! As you can see, I've put a vertical line between two images for the desktop version: The issue is that the mobile version does not look well. I'd like to either hide it or make it horizontal. Note: I made the vertical line using CODE INJECTION <div class="vertical-line"></div> Thank you! Link to comment
Solution Lesum Posted September 7, 2023 Solution Share Posted September 7, 2023 @byandreavaldes To hide the vertical line on mobile, you can try adding this code snippet under Custom CSS pan @media only screen and (max-width: 767px) { .vertical-line { display: none !important; } } To transform the vertical line to a horizontal one on mobile, you can try adding this code snippet: @media only screen and (max-width: 767px) { .vertical-line { -webkit-transform: rotate(90deg) !important; -moz-transform: rotate(90deg) !important; -o-transform: rotate(90deg) !important; -ms-transform: rotate(90deg) !important; transform: rotate(90deg) !important; } } byandreavaldes, SeMcJay and Piebie 2 1 If my comments were useful, please like or mark my solution as answer so others can scroll to it quickly. Sam Web Developer & Digital Designer ☕ Did you find my contribution helpful? Buy me a coffee? Link to comment
byandreavaldes Posted September 7, 2023 Author Share Posted September 7, 2023 Thank you soo much! Lesum 1 Link to comment
luminescentdreams Posted September 15, 2023 Share Posted September 15, 2023 (edited) Hi @byandreavaldes (and anyone else who stumbles upon this forum post), I have a slightly different solution to this problem that doesn't involve code (as long as your Squarespace site is on 7.1 Fluid Engine)! Instead of adding vertical lines with code, I like to upload a graphic of a vertical line (that I created in Canva) on desktop view and then hide it behind an image or shape on mobile view (so that it doesn't show up). ✨ Here's a tutorial video explaining exactly how to do it: https://www.luminescentdreams.com/tutorials/the-easiest-way-to-create-vertical-lines-in-squarespace-with-no-code Thanks so much & let me know if this helped! Alyssa Parr Squarespace Expert & CEO of Luminescent Dreams | Tutorials | Templates | Portfolio 👩💻 Hire me to build or edit your website: VIP Days | Custom Web Design alyssa@luminescentdreams.com Edited September 15, 2023 by luminescentdreams byandreavaldes and Piebie 2 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