i have a bootstrap table with the bootstrap class of "table-responsive" as a result is sets overflow-x to auto for the times that the table is too wide for the screen.
i have also set the the th elements to the bootstrap class of "sticky-top" which sets the position of the table th to sticky
as can be seen in this answer of the question Why does overflow:hidden prevent position:sticky from working? this is because when the parent of the sticky element is set to overflow it becomes the scrolling container for the element rather than the window
for now i have set table-responsive to overflow only if it is needed with a media query like so:
.table-responsive{
overflow-x:inherit;
}
@media (max-width:432px){
.table-responsive{
overflow-x:auto;
}
the issue is now that the table header doesn't stick on mobile screens