help to make my accordion default closed

3 replies·opened Jul 20, 2023
R
roburdickJul 20, 2023

I have tried following some instructions but it's always open on page load! can you see what it is that I need to add? https://birdclick.co.uk/endonet/the-endonet-team.php

The accordion is under Patricia Fairbrother and is open!

Thanks

Rob

S
SemiColonWebSTAFFJul 20, 2023

Hello,

You can consider using something like this:

<div class="accordion accordion-flush">
	<div class="accordion-item">
		<h2 class="mb-0">
			<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#flush-collapse">
			Accordion Item #1
			</button>
		</h2>
		<div id="flush-collapse" class="accordion-collapse collapse">
			<div class="accordion-body">Placeholder content for this accordion, which is intended to demonstrate the <code>.accordion-flush</code> class. This is the first item's accordion body.</div>
		</div>
	</div>
</div>

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

R
roburdickJul 20, 2023

That is great thanks for your help! Is there an easy way to make this use dark colors? I tried adding data-bs-theme="dark".

Rob

S
SemiColonWebSTAFFJul 21, 2023

Hello,

Adding the .dark Class should work fine but since you are using Canvas v6.x, the data-bs-theme="dark" is not available and only Canvas v7.x has the most powerful Dark (Contrast) Color capabilities. We recommend updating to Canvas 7 if you are looking to use the Dark Color Scheme to its full extent.

Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard