Jump to content

Wrapping text lists that have line dividers without overlapping.

Go to solution Solved by Ziggy,

Recommended Posts

Hello!

I have a layout design consisting of text blocks interspersed with line blocks to create what looks like a ruled list of terms/sentences. It looks fine on large viewports and mobile. But anything in between on smaller screens like laptops and iPads, when the responsiveness does its thing and text lines wrap, they just overlap over the line blocks (rather than the line blocks pushing down to accommodate the text wrapping).  I want the divider lines to "react" to text lines wrapping and unwrapping, accordingly to maintain the ruled list look and spacing. Any ideas on how I could do that? Before and after screen shots attached and URL is above.

Thanks in advance!

_ JV

Screen Shot 2023-03-31 at 1.32.54 PM.png

Screen Shot 2023-03-31 at 1.47.13 PM.png

Link to comment

Can you share your website URL?

Have you got the text blocks overlapping with the line blocks?

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 

  Did I help? Buy me a coffee?

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

Link to comment

I would suggest tweaking the row and column gap manually in the section settings, reducing the gap should allow more fine control of each of the block row heights.

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 

  Did I help? Buy me a coffee?

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

Link to comment

Thanks for taking a look, Ziggy.

Will that solve the responsive wrapping issues though? Will the line bump downward when a text line wraps onto two lines? I don't want to have to build in a lot of space between the text and the horizontal line for when screen widths allow the text to fit on one line just to accommodate it when it wraps - that will look weird when it fits on one line.

In the meantime, I'll work on tweaking the spacing and see what happens!

Link to comment

If you can control the spacing enough to set up each block to not have an overlap with the one below, you would be able to solve the wrapping issue.

A second solution would be to use code to add in the lines below each text block, removing the need for the line blocks, and avoiding the line wrapping over the line issue.

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 

  Did I help? Buy me a coffee?

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

Link to comment
  • 2 weeks later...

I went back to the issue and I think I am going to need to go the code injection route to resolve this as you suggested, @Ziggy. Do you know that code injection piece? (When this reolves, I will buy your coffee!)

The reason this is happening (and why I had to overlap text blocks with the line blocks to get the spacing I wanted) is that the grid is not letting the line of text take up any less space than 2 grid rows no matter what I do with spacing. So it is always going to add a grid row below it, forcing me to place the line farther away form the text than I'd like to). Unless I am totally missing something, this seems to be the barrier. See attached screen shots to see. 

Group 1 (7).png

Group 2 (3).png

Link to comment

Code like this would add a border below each text block on the page, meaning that you don't need the line blocks:

section[data-section-id="6397a0093cf0167b830bf4f9"] {
  .sqs-block-html:not(#block-yui_3_17_2_1_1670785169722_2479543) {
    border-bottom:1px solid #bbb;
  }
}

 

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 

  Did I help? Buy me a coffee?

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

Link to comment

@ZiggyThank you, that added the line to the text block itself, so the lines wrap with the text!

However, because it insists on adding space below the text in the text block, the spacing between text and lines is less than desired. Is there a way to resolve this text box height issue? (see screenshots for explanation).

Group 1 (8).png

Link to comment

Would this setup work better for you:

https://squarefortytwodesign.squarespace.com/dividing-lines

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 

  Did I help? Buy me a coffee?

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

Link to comment
  • Solution
3 minutes ago, Javdesign said:

Why Squarespace doesn't have a simple approach to ruled lists is beyond me!

Ruled lists aren't a very common design request, and often when they are they're part of an accordion.

4 minutes ago, Javdesign said:

Yes, absolutely.

I set this up with two text blocks (left and right column) and then this Custom CSS:

#block-yui_3_17_2_1_1681487450579_3140, #block-2afcd6564db47f91b91f {
  p {
    border-bottom:1px solid #bbb;
    padding: 2rem 0;
    margin:0;
  }
}

You would need to change the block IDs to your two text blocks and the "p" to "h3".

If you duplicate that section and change the setup to my suggestion I can finish customising the CSS for you.

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 

  Did I help? Buy me a coffee?

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

Link to comment

@ZiggyFantastic, thank you! Found your coffee link 😉 Coming soon.

OK, so I made two text blocks with text in each and changed the p to h3. Seems to look great!

Is there anything else needed? On my end, I'll just need to repeat this for the Services pages, adding the 2 block IDs in each to code.

JV

 

Link to comment
1 hour ago, Javdesign said:

On my end, I'll just need to repeat this for the Services pages, adding the 2 block IDs in each to code.

Yes, just add more block IDs, comma separated, as need.

Thanks for the coffees! Could you mark my post as the solution and give a thumbs up too? Thanks!

Please like and upvote if my comments were helpful to you. Cheers!

Zygmunt Spray
Squarespace Website Designer
Contact me: 
https://squarefortytwo.com 

  Did I help? Buy me a coffee?

🔌 Ghost Squarespace Plugins (Referral link)
📈 SEO Space (Referral link)
 SquareWebsites Plugins (Referral link)
 🔲 SQSP Themes (Referral link) 
Spark Plugin (Referral link) 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.