HTML Collapsible expanding so that viewport is pushed to the bottom of the content

Viewed 44

I want to have a collapsible group with a large amount of content within each section. A problem that I've been having is that if I am scrolled down the page with the collapsible in around the top third of the viewport, if I click the collapsible to open it, it opens so that I am looking at the bottom of the content. So I have to scroll up past the content of the collapsible in order to close it again. As well as this, users won't be reading the content top-down.

This happens whether I have defined my own collapsible, or if I'm using Bootstrap collapsible/accordion.

Is there a way to ensure that collapsibles always open so that the viewport is left looking at the collapsible title and the start of the content, instead of the user being pushed down?

I've searched everywhere but for some reason I can't find an answer. Thank you.

0 Answers
Related