简体   繁体   English

如何为表格应用水平滚动条

[英]How to apply a horizontal scrolling bar for a table

Can anyone help me how to do this. 谁能帮我怎么做。 I have attached my code below. 我在下面附加了我的代码。 I tried doing it . 我试过了。 But it is not working properly. 但是它不能正常工作。

http://jsfiddle.net/Akz8j/15/ http://jsfiddle.net/Akz8j/15/

While entering number in column 7, accordingly the number of columns will get added. 在第7列中输入数字时,将相应地增加列数。

But the scroll bar is not working. 但是滚动条不起作用。

without that i need to have the other table just below to the total members column, with same width and height 没有那,我需要在总成员列的正下方有另一个表,且宽度和高度相同

can anyone help me in this. 谁能在这方面帮助我。

Thanks all.. 谢谢大家

There are couple problems: 有几个问题:

  1. Your html isn't valid. 您的html无效。 You don't have closing div tags. 您没有关闭div标签。
  2. I've removed align=right on the table because it couses problem with scroll. 我删除了表上的align=right ,因为它会引起滚动问题。

Code: http://jsfiddle.net/Akz8j/16/ 代码: http//jsfiddle.net/Akz8j/16/

Remove both align and width attributes from member_table, ie. 从member_table中删除align和width属性,即。 change your html from: 从以下位置更改您的html:

<table align="right" width="70%" cellpadding="1" cellspacing="2" border="1" id="member_table">

To

<table cellpadding="1" cellspacing="2" border="1" id="member_table">

Then your scroll bar will works. 然后您的滚动条将起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM