Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
dummy2k15

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

Question

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.

Edited by dummy2k15

Share this post


Link to post

6 answers to this question

Recommended Posts

  • 2

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.

Edited by Justin Klinkerman

Building and customizing websites using Squarespace

Share this post


Link to post
  • 0

Thank you. Is there any way for me to format the text within the text box? For example, I want to break down the text in paragraphs, but it doesn't work that way in this current state.

Share this post


Link to post
  • 0

Yeah, all you need to do is add your content into element tags like this:


<div class="scrollBox">

<h2>Title</h2>
<p>paste your text here</p>
<p>more text goes here</p>

<h2>Title</h2>
<p>paste your text here</p>
<p>more text goes here</p>

</div>


Building and customizing websites using Squarespace

Share this post


Link to post
Guest
This topic is now closed to further replies.

×
×
  • Create New...