I have a vertical list and on small screens, it has an overflow-x scroll. there is the active class for the active tab. However, if I click for example last item, it is not visible %100 as seen in the screenshot.
I tried to use the scrollIntoView() function but it didn't work out for mobile devices. Is it possible to do it via CSS? the scrollbar has to move according to the active tab so the active tab should always be visible
Can you share what code you already have so we know what you're really trying to do?
Are you talking about tabs like the ones found on YouTube?
If so, it looks like taking CSS from this Codepen will answer your question if you are in fact asking how to get tabs like the ones shown above. Just look around and see what you need to do to modify it to your liking and then adjust your code. Click on the link and go to #13 (won't let me post a Codepen without code, but scroll down to #13 and there's your answer) https://csshint.com/css-tabs/
I searched "animated css tabs" on Google, went to the first result and scrolled down to #13 to find this.