滚动条在带有overflow = auto的div标签中不起作用

时间:2011-10-09 22:20:37

标签: html css

enter image description here

与附加图像一样,显示滚动条但不起作用。我无法向上滚动或向下滚动。以下是HTML代码:

              <div class='site-chosen-stickere'>
                <div class='all-site'>
                  <table width="100%" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="20px" align="center" valign="middle">
                        <input type="checkbox" id="CAll" onclick="selectSites(this.checked);" />
                      </td>
                      <td valign="top">
&nbsp;
                      </td>
                    </tr>
                  </table>
                </div>
{foreach $sites as $site}
                <div class='site'>
                  <table width="100%" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="20px" align="center" valign="middle">
                        <input type="checkbox" id="C{$site.id}" />
                      </td>
                      <td width="55px" align="center" valign="top">
                        <img src="{$site.icon}" width="48px" height="48px" />
                      </td>
                      <td valign="top">
                        <div class="title"><a target="_blank" href="http://{$site.domain}">{$site.title}</a></div>
                        <div class="description">{$site.description}</div>
                      </td>
                    </tr>
                  </table>
                </div>
{/foreach}
                <p>&nbsp;</p>
              </div>

以下是CSS代码:

.site-chosen-stickere { width: 650px; height: 290px; margin-top: 20px; overflow: auto; }
.site-chosen-stickere .site { width: auto; height: 48px; overflow: hidden; clear: both; float: left; }
.site-chosen-stickere .site .title { width: 100%; height: 18px; overflow: hidden; }
.site-chosen-stickere .site .title a { color: #7192A8; font-weight: bold; text-decoration: none; }
.site-chosen-stickere .site .description { width: 100%; height: 26px; overflow: hidden; }

如何让滚动条工作?

0 个答案:

没有答案