eharch Posted August 4, 2023 Share Posted August 4, 2023 Is there a way to control where in a line of text the break(s) occur when the design adapts for screen/device? In my case, I have a single line for my business address, when viewed on a computer, but on a phone, it breaks into multiple lines, but in unpredictable places, so it's somewhat unreadable as an address, i.e. the name of the firm, the street number, then a line break followed by the street name, etc. Thoughts? Thanks in advance! Link to comment
creedon Posted August 4, 2023 Share Posted August 4, 2023 Please post the URL for a page on your site where we can see your issue. A link to the backend of the your site won’t work for us, i.e. a url that contains /config/. Please set up a site-wide password, if your site is not public and you've not already done so. Post the password here. Adding a site-wide password does not allow anyone to alter your site. It only allows those with the password to see your site. Please read the site-wide password and how to share a link documentation to understand how they work. We can then take a look at your issue. You may find How to post a forum question post useful. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. Link to comment
eharch Posted August 4, 2023 Author Share Posted August 4, 2023 https://www.essentialhabitat.com bottom of the page Link to comment
creedon Posted August 4, 2023 Share Posted August 4, 2023 Where lines break can be tricky. There is no CSS to address words individually or in groups. That part is left to HTML. I can see two ways to go. You can use two sets of text blocks one for desktop display and one set for mobile. Then show/hide those block sets depending on viewport size. So for example. On desktop you'd have one block... SAN ANSELMO, CALIFORNIA 94960 ...and then a second block... SAN ANSELMO, CALIFORNIA 94960 ...and the use the CSS show/hide method I mentioned. Alternately you could dump the text blocks and use code blocks to get more control over how the text is breaking. <p style="text-align : center;"> <span style="white-space : nowrap;"> SAN ANSELMO,</span> <span style="white-space : nowrap;"> CALIFORNIA 94960 </span> </p> The top text is a code block. These techniques are not guaranteed to fix your word wrapping issue but should give a bit more control. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects. 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