Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap responsive table not scrolling vertically on iOS devices

This is what I have:

<div class="table-responsive">
    <table class="table" style="background: transparent">
        ....
    </table>
</div>

I am using the following bootstrap.css file: http://netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css

When I try to scroll up and down on an iOS device (while my finger is touching the table), it doesn't scroll. It just drags the whole page up and down. I have to touch the body background or any other object, other than the table, in order to scroll. This problem doesn't come up in Android devices, but it seems to be there on iOS devices, like iPhone.

I tried adding overflow-y: auto to <div class="table-responsive">, but it still didn't work.

What do I need to add in order to enable scrolling on mobile devices (Apple devices, specifically)?

like image 670
DemCodeLines Avatar asked Feb 11 '14 15:02

DemCodeLines


People also ask

How do I make my bootstrap table Mobile responsive?

You can make any table responsive across all viewports by wrapping a . table with . table-responsive class. Or, pick a maximum breakpoint with which to have a responsive table up to by using .

How do you set the size of a column in a bootstrap responsive table?

On the table you now need to enable flex box by adding the class d-flex , and drop the xs to allow bootstrap to automatically detect the viewport. Table column width use the same layout as grids do; using col-[viewport]-[size] . Remember the column sizes should total 12; 1 + 3 + 3 + 5 = 12 in this example.

What does table responsive do in bootstrap?

Responsive tables allow tables to be scrolled horizontally with ease. Make any table responsive across all viewports by wrapping a . table with . table-responsive .


1 Answers

For anyone else having this problem, all I had to do to solve it was to add the following line to the css of the table-responsive class:

-webkit-overflow-scrolling: touch;

And now it works as expected.

like image 128
Luccas Correa Avatar answered Oct 14 '22 14:10

Luccas Correa