x
1
<h2>Responsive Table</h2>
2
<p>If you have a table that is too wide, you can add a container element with overflow-x:auto around the table, and it will display a horizontal scroll bar when needed.</p>
3
<p>Resize the browser window to see the effect. Try to remove the div element and see what happens to the table.</p>
4
5
<table>
6
<tr>
7
<th>First Name</th>
8
<th>Last Name</th>
9
<th>Points</th>
10
<th>Points</th>
11
<th>Points</th>
12
<th>Points</th>
13
<th>Points</th>
14
<th>Points</th>
15
<th>Points</th>
16
<th>Points</th>
17
<th>Points</th>
18
<th>Points</th>
19
</tr>
20
<tr>
21
<td>Jill</td>
22
<td>Smith</td>
23
<td>50</td>
24
<td>50</td>
25
<td>50</td>
26
<td>50</td>
27
<td>50</td>
28
<td>50</td>
29
<td>50</td>
30
<td>50</td>
31
<td>50</td>
32
<td>50</td>
33
</tr>
34
<tr>
35
<td>Eve</td>
36
<td>Jackson</td>
37
<td>94</td>
38
<td>94</td>
39
<td>94</td>
40
<td>94</td>
41
<td>94</td>
42
<td>94</td>
43
<td>94</td>
44
<td>94</td>