Seolit
  • Home
    • SEO vs Website Optimisation
    • Best Website Optimization Tips
  • Website
    • Charity
    • Choosing the right CMS
    • Choosing a good domain name
    • Examples
    • How to choose a good SEO Consultant
    • Weebly Optimization Tips >
      • Collapsible Content
      • Weebly Widgets and Apps
    • Why Bad Links Matter
  • Marketing
    • Online Scams
    • Affiliate Marketing
    • PPC Campaigns
  • Consultant
    • Keywords
    • Link Building
    • Social Media
    • SSL Certificates
    • Voice Search
  • Prices
  • FAQs
  • Contact
  • Blog
Weebly expandable text boxes

CREATE EXPANDABLE TEXT CONTENT BOX IN WEEBLY

Create Accordion style read more text boxes in Weebly
How do I create a read more box to show additional content on my Weebly website?
How do I create an accordion style text box in Weebly?
How do I create collapsible and expandable content on my Weebly website?
How do I create a read more link in Weebly that does not open to a new page?
Can I create an accordion text box in my Weebly website without using an app?
Can I create read more text boxes to display more content in Weebly?


Answer: To create expandable, collapsible, accordian style, "read more" text boxes follow the simple instructions below.
Difficulty: Easy - So this is relatively easy to do within Weebly and requires no coding skills at all.
Skills: None - Just the ability to click, copy and paste into the correct sections and files.
Time to complete: Quick <5 mins (less than 5 minutes)

NOTES: For this example I have included a clean code, with black text on a white background but you can change these colours quite simply. And you can change the Read More text to any text you want i.e. expand content, read more, something about add topic, a question, etc.
FINAL NOTE: When you have installed the CSS and Javascript (Just the once), all you need to do is add the html and your text to any page on your website.

HERES THE SIMPLE OPTION

Just drag and drop </> Embed Code tile on to your page and add the following code:

​​<p><a href="#" onclick="toggleContent(); return false;">CLICK TO SHOW CONTENT</a></p>

<div style="display: none;" id="content">
  <p>This is the content to reveal, show and hide, expand and collapse or simply open up to read more.</p>
</div>

<script>
function toggleContent() {
  var content = document.getElementById("content");
  if (content.style.display === "none") {
    content.style.display = "block"; // Show content
  } else {
    content.style.display = "none"; // Hide content
  }
}
</script>
 NOTE: ONLY ONE COLLAPSIBLE BOX PER PAGE WITH THIS OPTION

THE CODE IN ACTION

CLICK TO SHOW MORE CONTENT

This is the content to reveal, show and hide, expand and collapse or simply open up to read more.

Html code for collapsible text box in Weebly

STEP 1 - Embed COde THE HTML CODE

STEP ONE

Using the embed code </> drag and drop the tile add this to the section of the page where you want your collapsible / expandanble content to appear. Copy and paste this code and add content where needed. I have added the main content types. Title, Text, Bullet Points, Image and Link.
Feel free to add <br> and </br> to add space to content.
<button type="button" class="collapsible">Read More</button>
<div class="content">
<h2>Add your Title</h2>
<ul>
<li>bullet point one</li>

<li>bullet point two</li>
</ul>
​<br></br>

<img src="picture.jpg" width="200" height="100" alt="add your image description">
  <p>Add your content here</p>
​Here you can add a link to <
a href="url">
link text</a>
</div>
CSS Code for Collapsible read more text box in Weebly

STEP 2 - ADD THE CSS CODE

STEP TWO

Go to Theme / Edit HTML / CSS ( bottom left).
​Find CSS files - it maybe named - Global.css or Main.css or Main.less or Page-type.less. 
Copy and Paste this code into this file.
Be sure not to accidentally paste over other code in this section. I just add it to the top and keep the code comments so I know what and where it is, for future reference. Here you can also change the alignment, font sizes and colours.
​/* Style the button that is used to open and close the collapsible content */
.collapsible {
  background-color: #ffffff;
  color: #000000;
  cursor: pointer;
  padding: 10px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 18px;
}

/* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */
.active, .collapsible:hover {
  background-color: #ffffff;
}

/* Style the collapsible content. Note: hidden by default */
.content {
  padding: 0 18px;
  display: none;
  overflow: hidden;
  background-color: #fff;
  }
Javascript for collapsible text box in Weebly

STEP 3 - ADD THE JAVASCRIPT

STEP THREE

Copy and paste the code into the file custom.js located under EDIT HTML / CSS
​var coll = document.getElementsByClassName("collapsible");
var i;

for (i = 0; i < coll.length; i++) {
  coll[i].addEventListener("click", function() {
    this.classList.toggle("active");
    var content = this.nextElementSibling;
    if (content.style.display === "block") {
      content.style.display = "none";
    } else {
      content.style.display = "block";
    }
  });
}
Collapsible Text Box Code for Weebly

AND HERE IS THE COLLAPSIBLE CODE IN ACTION

Expandable and collapsible, it does both. Although it's default is collapsed and it's even starting to look like an accordion.


HEY PRESTO AND HERE IS YOUR READ MORE CONTENT IN WEEBLY

Here you can create really simple expandable, accordian style text boxs with images and links.And use copy and paste to create multiple.

  • Expandable
  • Collapsible
  • Accordion boxes
  • Read more content


Weebly Accordion tips

​See my other Weebly Tips


AND HERE IS ANOTHER EXPANDABLE TEXT BOX

Seriously you can just keep going and create mutliple expandable boxes. These are perfect for creating FAQ Frequently asked questions within your Weebly Blog or website.

SEOLIT BLOG

Latest News & SEO Insights

Stay up to date with the latest SEO news, website optimisation tips, digital marketing advice and practical guides from SEOLIT. Discover useful ideas to help improve your website, attract more visitors and generate more enquiries.

01
Online Security

Scam Ads Online: Why They Keep Appearing

Why scam adverts continue to appear online, how they work and what UK users can do to protect themselves from fraudulent ads.

Read Article →
02
SEO Tips

Website Optimisation Tips

Practical website optimisation advice and simple improvements that can help your website perform better in search engines.

Read Article →
03
Website Strategy

Choosing a Good Domain Name

What makes a good domain name and why choosing the right domain can be an important part of your online strategy.

Read Article →
04
Website Design

SEO News, Tips & Website Advice

Explore SEOLIT's collection of SEO news, search optimisation advice, website tips and digital marketing ideas.

Explore Articles →
05
Website Platforms

Weebly Optimisation Tips

Discover practical ways to optimise a Weebly website and improve its visibility, performance and search presence.

Read Article →
06
SEO & Links

SEO, Links & Search Visibility

Learn more about links, SEO and the factors that can influence your website's visibility in search engine results.

Read Articles →
View All SEO News & Articles →
SEOLIT Customer & Client Reviews
SEOLIT BEST SEO LONDON
Rated 5/5 based on 30 reviews

CONSULTANT
PRICES
BLOG
CONTACT
SEOLIT London Location

Location

Call us

CALL

Email Zach Mendelsohn @SEOLIT

EMAIL

SEOLIT RSS FEED
RSS FEED
© Copyright 2026 - SEOLIT London SEM company managed by SEO Consultant Zach Mendelsohn
Sitemap
Powered by Create your own unique website with customizable templates.
  • Home
    • SEO vs Website Optimisation
    • Best Website Optimization Tips
  • Website
    • Charity
    • Choosing the right CMS
    • Choosing a good domain name
    • Examples
    • How to choose a good SEO Consultant
    • Weebly Optimization Tips >
      • Collapsible Content
      • Weebly Widgets and Apps
    • Why Bad Links Matter
  • Marketing
    • Online Scams
    • Affiliate Marketing
    • PPC Campaigns
  • Consultant
    • Keywords
    • Link Building
    • Social Media
    • SSL Certificates
    • Voice Search
  • Prices
  • FAQs
  • Contact
  • Blog