Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I specify the display position of overflow content?

First off I am totally open to edits to my title and / or tags. I am not clear how to describe this question.

I have a tab interface that collapses to a overflow div in mobile mode (like GitHub does). Looks like this:

enter image description here

The issue I have is the active tab is hidden - I want the active one to always be displayed by default vs the user needing to 'slide' it over to find it:

enter image description here

I have zero idea where to start. Is this CSS, Anchors (not ideal), Javascript?

like image 654
Dan Tappin Avatar asked Nov 25 '25 10:11

Dan Tappin


1 Answers

Add a ref or some identifier to the active tab and always scroll to that tab on page reload or mount.

Something like this maybe or your own logic,


var elmnt = document.getElementById("content");
elmnt.scrollIntoView();

like image 57
Zunaib Imtiaz Avatar answered Nov 27 '25 00:11

Zunaib Imtiaz



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!