Jump to content

How do I make a scrolling text box so I can keep text contained within the box instead of having one long page?

Recommended Posts

Hey, I hope the question makes sense. I want to format my pages so that I wouldn't have to scroll the whole page to read a body of text. I haven't found any success.

There's a similar question that was asked last year, but the answer isn't too in-depth for a newb like me to understand. I don't have much experience with CSS, so if there is a step by step way to do this, I'd really appreciate it.

Link to comment
  • Replies 5
  • Views 21.8k
  • Created
  • Last Reply

Add a Code Block where you want the text to appear and paste this into it:


<div class="scrollBox">
paste your text here
</div>

Put your text where it says 'paste your text here'.

Copy and paste this into the Custom CSS Editor:


.scrollBox {
 height: 120px;
 width: 100%;
 border: 1px solid #ccc;
 overflow: auto;
 padding: 10px 
}

You can change the dimensions of the box by changing the values after the height and width.

Building and customizing websites using Squarespace

Link to comment
  • 3 weeks later...
  • 1 year later...
  • 1 year later...

Archived

This topic is now archived and is closed to further replies.

Guest
This topic is now closed to further replies.
×
×
  • 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.