decker Posted February 5, 2022 Share Posted February 5, 2022 (edited) Site URL: https://mattdecker-art.squarespace.com/portfolio/environment Hi all! First day on Squarespace and I'm unable to find an element to see if it has a unique CSS class (? - been a minute). This was a premade template to start; at the bottom of the individual portfolio pages there are some nav elements that I'd like to reduce to font size on for mobile, as they overlap. Side question: are media queries still the most effective way to specify device styles, and do they work on Squarespace? TIA! Edited February 5, 2022 by narwhal-enthusiast linked wrong page Link to comment
Solution meganheath Posted February 5, 2022 Solution Share Posted February 5, 2022 Hi, Yes, media queries work on Squarespace. The pagination element you're wanting to target uses calc to set the font size. Add this code to your site header through Settings > Advanced > Code Injection <style> @media screen and (min-width: 0) and (max-width: 1567px) and (orientation: portrait){ [data-collection-type^="portfolio"] .item-pagination-title { font-size: calc((2 - 1) * 1.2vh + .6rem); } } </style> Hope that solves it. Link to comment
decker Posted February 6, 2022 Author Share Posted February 6, 2022 Hello! Yes this solved it, cool to learn about vh and em as well. Thanks much! meganheath 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