Jump to content

Table with fixed header and column +expandable rows

Recommended Posts

Site URL: https://www.oryxdentalsoftware.com/tablecomparison-edit

Hello,

I did a table using htm css an js. The rows in light blue are expandable. 

When the page first loads it's showing these sections expanded instead of collapsed. How I can make them collapsed when I first visit the page?

Also I would like to add an arrow (up/down) for collapse/expand next to the title.

Can I make the first 2 columns, the header and the footer fixed (shown in attachment) and make the remaining body part scrollable horizontally? It would be good especially for mobile.

Thank you 

 

 

Edited by Yaraf
Link to comment
Quote

When the page first loads it's showing these sections expanded instead of collapsed. How I can make them collapsed when I first visit the page?

In your code block for the table change the following lines from...

<tbody class="hide">

...to...

<tbody class="hide" style="display : none;">

I don't have answers for your other questions at this time.

Let us know it goes.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.