2013-07-11 62 views
1

我尝试将overflow:auto;overflow-x:auto;添加到我的<table>元素中,但仍然无法使用。有任何想法吗?TD不会添加水平滚动条

这里是我的网页:

http://www.whiterootmedia.com/database/dusty_arlia/jquery_cdns.html

这里是我的代码:

<table class="yellow_table" style="overflow:auto; overflow-x:auto;"> 
<tr> 
<th>Host</th> 
<th>Location</th> 
</tr> 

<tr> 
<td>Google</td> 
<td class="left_aligned_red_cell">https://developers.google.com/speed/libraries/devguide#jquery</td> 
</tr> 

<tr> 
<td>jQuery.com</td> 
<td class="left_aligned_red_cell">http://code.jquery.com/</td> 
</tr> 

<tr> 
<td>Microsoft</td> 
<td class="left_aligned_red_cell">http://www.asp.net/ajaxlibrary/cdn.ashx#jQuery_Releases_on_the_CDN_0</td> 
</tr> 

<tr> 
<td>CDNJS</td> 
<td class="left_aligned_red_cell">http://cdnjs.com/#jquery</td> 
</tr> 

</table> 
+1

给你的表的宽度去溢出:自动 – Pete

回答

3

包裹在一个div表,并给overflow:auto到div。