Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery html表列大小调整_Jquery_Html_Css - Fatal编程技术网

Jquery html表列大小调整

Jquery html表列大小调整,jquery,html,css,Jquery,Html,Css,我正在尝试创建一个简单的html表(一行到一列)。我想要一列用滚动条溢出。问题是,无论css设置如何,我都会根据文本更改列大小,滚动条是水平的,而不是垂直的。 为了让我的桌子成为我想要的样子,需要改变什么 Html代码: <table class="homepage_table"> <tr > <td id="Articlesbar" width="20%" > <%@include file="news

我正在尝试创建一个简单的html表(一行到一列)。我想要一列用滚动条溢出。问题是,无论css设置如何,我都会根据文本更改列大小,滚动条是水平的,而不是垂直的。 为了让我的桌子成为我想要的样子,需要改变什么

Html代码:

<table class="homepage_table">
    <tr >
        <td id="Articlesbar" width="20%"  >
            <%@include file="newsData.jsp" %>

        </td>


        <td id="about_td" width="80%"  >
    <div class="fadein">
    <img src="imp.gif">
  <img src="http://thefinancialbrand.com/wp-content/uploads/2008/08/tagline-tagcloud.gif">
  <img src="slogan1.gif">

</div>

        <div id="about_text" width="100%" height= "100px" >     
                Founded in 1992 as a Finance and Securities Company, 
                Imperia Bank converted into a fully fledged commercial bank in January 1996. 
                Since then the bank has had a long standing tradition of achieving strong financial performance and carrying out 
                expansion strategies while successfully focusing on efficient client service delivery.<br><br>
                Over the last 20 years, Imperia Bank has achieved a sustained growth in our customer deposit base which is largely attributed to the level of confidence our customers have in the bank and our corporate strategy.
                Currently we have 23 branches in our expanding branch network across major towns and cities.<br><br>
                Imperial Bank will continue to enhance the existing risk management parameters through the effective use of our newly installed and cutting edge core banking system.
                As part of our growth strategy, we are also continuing to recruit qualified professional staff, and providing appropriate training to our existing human resources to ensure we continue to meet evolving customer demands.
        </div>
        </td>
    </tr>
</table>

我很快就把这把小提琴放好了:

我将此CSS添加到您的
#about_text
ID:

  max-height:200px;
  max-width:700px;
  overflow-y: scroll;
我不确定这是否是你想要的,但我认为它似乎符合你的要求


您可以根据需要调整宽度/高度和
overflow-y:scroll允许滚动条出现。

我被揍了一顿,但看起来海报希望滚动条出现在Articlesbar上

因此,简单的方法是在td上设置一个高度,在其内部添加一个div,然后在其中添加滚动条

结构将是

<table>
     <tr>
        <td>
           <div>
           </div>
        </td>
      </tr>
 </table>


使用
table
而不是
DIV
有什么特别的原因吗?我应该提到这一点,但在“Articlesbar”中,我从mysql导入数据。它还能用吗?
  max-height:200px;
  max-width:700px;
  overflow-y: scroll;
<table>
     <tr>
        <td>
           <div>
           </div>
        </td>
      </tr>
 </table>