<Details> element expands upwards when container is scrolled to bottom

Viewed 174

Ordinarily, when a <details> element is opened, the > details changes to v details, and the expanded content appears below.

But if its container is scrolled as far down as it goes, the content expands up, pushing up the initial > details up with it (and <summary>, if included.)

If there is a lot of content in the details, the top/summary line may be pushed up off screen altogether.

Is it possible to force the <details> content to expand downward, even if its container is scrolled to the bottom?

(Solutions are ideally HTML/CSS; I could probably force it through JS, but I just feel like there's something basic I'm missing.)

0 Answers
Related