Found this content helpful? Log in or sign up to leave a like!

HTML/CSS Code

Jump to solution
IrishCorpuz
Community Member

Hello, everyone.

I’m customizing my Canvas course pages and need some help with a few CSS/HTML features. Specifically, I’m looking for code or methods to achieve:

  1. Scroll-Based Progress Bar (Module Progression):

    • A progress bar or animation that fills up as the user scrolls down the page.

    • Ideally, it would be positioned at the top or side of the page to visually show how far down the student has scrolled.

  2. Scroll Lock / Fixed Elements:

    • How to “lock” an element (like a progress bar, navigation buttons, or a header) so that it stays visible while scrolling through the rest of the content.

  3. Custom Flip Cards:

    • HTML/CSS examples for interactive flip cards (e.g., question on front, answer on back) that work well within Canvas.

  4. Accordion Sections:

    • Code for collapsible accordion content areas to make pages more organized and visually clean.

If anyone has working examples or tips for making these features Canvas-compatible (especially within the Rich Content Editor or on course pages), I'm just a new user of Canvas and would appreciate any help/ideas that you could share. 🙂

Thanks so much!

Labels (1)
0 Likes
1 Solution
KyleighBecker
Community Explorer

I am not sure about the other 1, 2, and 3, but I have some code for accordions! Jsut copy and paste into the html editor, of course (black text on light grey accordions). The screenshot is the mobile view. 

 

<details style="margin-bottom: 10px; border: 1px solid #ccc; border-radius: 5px; padding: 10px; background-color: #f0f0f0; color: #000000;">

    <summary style="font-size: 1.1em; cursor: pointer; margin-bottom: 5px; background-color: #f0f0f0; color: #000000;">Panel 1</summary>

    <p style="margin: 10px 0 0; padding: 5px;">Panel 1 Content.</p>

</details>

<details style="margin-bottom: 10px; border: 1px solid #ccc; border-radius: 5px; padding: 10px; background-color: #f0f0f0; color: #000000;">

    <summary style="font-size: 1.1em; cursor: pointer; margin-bottom: 5px; background-color: #f0f0f0; color: #000000;">Panel 2</summary>

    <p style="margin: 10px 0 0; padding: 5px;">Panel 2 Content.</p>

</details>

<details style="margin-bottom: 10px; border: 1px solid #ccc; border-radius: 5px; padding: 10px; background-color: #f0f0f0; color: #000000;">

    <summary style="font-size: 1.1em; cursor: pointer; margin-bottom: 5px; background-color: #f0f0f0; color: #000000;">Panel 3</summary>

    <p style="margin: 10px 0 0; padding: 5px;">Panel 3 Content.</p>

</details>

<details style="margin-bottom: 10px; border: 1px solid #ccc; border-radius: 5px; padding: 10px; background-color: #f0f0f0; color: #000000;">

    <summary style="font-size: 1.1em; cursor: pointer; margin-bottom: 5px; background-color: #f0f0f0; color: #000000;">Panel 4</summary>

    <p style="margin: 10px 0 0; padding: 5px;">Panel 4 Content.</p>

</details>

1000024074.jpg

View solution in original post