Phyo Posted April 15, 2021 Share Posted April 15, 2021 Site URL: https://www.phyo.es Hi my friend, im trying to add a vertical line on my website. I use this code: <div class="home__verticalline"> </div> <style> .home__verticalline { position: absolute; height: 2200px; border-left: 1px solid #d6ccc4; left: 50%; } </style> But I want to hide it when im on mobile so I add this media query: <style> @media only screen and (max-width: 700px) { .home_verticalline { display: none; } } </style> I think my code is OK, but when I check the website on mobile the "media query" doesn't run. I add some screenshots. Could you help me, please?? Link to comment
paul2009 Posted April 15, 2021 Share Posted April 15, 2021 You should add it to Design > Custom CSS, without the <style></style> tags, not to code injection. Phyo 1 About: SQSP User for 17 yrs. Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF Digital, building Squarespace Extensions to supercharge your commerce website. Content: Links in my posts may refer to SF Digital products or may be affiliate links. If my advice helped, you can thank me by clicking one of the feedback emojis below. I love coffee too. Link to comment
Phyo Posted April 19, 2021 Author Share Posted April 19, 2021 Hi Paul, I tried deleting de "<style></style>" and adding the code con the Custom CSS and it doesn't work. Do you know some another solution? Thank you! Link to comment
paul2009 Posted April 19, 2021 Share Posted April 19, 2021 1 hour ago, Phyo said: Do you know some another solution? Please share the public password that you've set, so that we can take a look at the page. This will make it easier for the community to provide an accurate answer. Phyo 1 About: SQSP User for 17 yrs. Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF Digital, building Squarespace Extensions to supercharge your commerce website. Content: Links in my posts may refer to SF Digital products or may be affiliate links. If my advice helped, you can thank me by clicking one of the feedback emojis below. I love coffee too. Link to comment
Phyo Posted April 19, 2021 Author Share Posted April 19, 2021 You're right! sorry! the password is phyoconcept Thank you! Link to comment
Solution paul2009 Posted April 19, 2021 Solution Share Posted April 19, 2021 You appear to be missing an underscore within the media query. It should be .home__verticalline not .home_verticalline. Phyo 1 About: SQSP User for 17 yrs. Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥. Work: Founder of SF Digital, building Squarespace Extensions to supercharge your commerce website. Content: Links in my posts may refer to SF Digital products or may be affiliate links. If my advice helped, you can thank me by clicking one of the feedback emojis below. I love coffee too. Link to comment
Phyo Posted April 19, 2021 Author Share Posted April 19, 2021 the most ridiculous mistake 😅 Thank you Paul!!! paul2009 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