BEST SEO LONDON
  • Home
    • Best Website Optimization Tips
  • Website
    • Choosing the right CMS
    • Choosing a good domain name
    • Weebly Optimization Tips >
      • Collapsible Content
      • Weebly Widgets and Apps
  • Marketing
    • Affiliate Marketing
    • PPC Campaigns
  • Consultant
    • Keywords
    • Link Building
    • SSL Certificates
    • Voice Search
  • Prices
  • FAQs
  • Contact
  • Blog
  • Charity
Create Accordion style read more text boxes in Weebly

CREATE EXPANDABLE TEXT CONTENT BOX 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.

Best SEO IN LONDON

SEO
SOCIAL MEDIA
CONSULTANT
PRICES
BLOG
CONTACT
SEOLIT LOCATION

Location

London
​
Picture

CALL

Tel: 07525 458 231
​

Email Zach Mendelsohn @SEOLIT

EMAIL

Email: [email protected]
​

SEOLIT RSS FEED
RSS FEED
© Copyright 2025 - SEOLIT London SEM company managed by SEO Consultant Zach Mendelsohn
Sitemap
Powered by Create your own unique website with customizable templates.
  • Home
    • Best Website Optimization Tips
  • Website
    • Choosing the right CMS
    • Choosing a good domain name
    • Weebly Optimization Tips >
      • Collapsible Content
      • Weebly Widgets and Apps
  • Marketing
    • Affiliate Marketing
    • PPC Campaigns
  • Consultant
    • Keywords
    • Link Building
    • SSL Certificates
    • Voice Search
  • Prices
  • FAQs
  • Contact
  • Blog
  • Charity