0

仅需要高度根据来自此外包数据的信息量来展开或折叠。这是我的 HTML 代码。

  <div style="width: 775px; position: relative; left: 15px; top: -745px; height: 250px; border: #CCC; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-width: 1px;"></div>

  <div style="width: 760px; position: relative; height: 17px; background-color: #Db0000; layer-background-color: #Db0000; border: 1px none #000000; color: #FFF; font-size: 12px; padding-left: 16px; padding-top: 4px;"> Promero<span style="font-weight: bold">NEWS</span></div>
<div style="width: 776px; position: relative; height: 2.5px; background-color: #Db0000; layer-background-color: #Db0000; top: 2px;"></div>

<div style="position: relative; width: 775px;">
  <p id="p1" style="color: #E23030; font-style: italic; font-weight: bold; font-size: 16px; font-family: arial, 'Trebuchet MS';">News Release</p>
  <p>July 16, 2012 -<em id="em"><a href="#">Salesforce CRM users connect to Promero's hosted call center software, Oracle Contact Center Anywhere</a></em>
  <p id="p2">March 6, 2012 -<em id="em"><a href="#">Promero offers complete Call Center Solution-Workforce Management-Complex IVR Scripting-CRM</a></em>
  <p>March 1, 2012 -<em id="em"><a href="#">Promero offers Oracle #1 Call Center Software only $59 per User </a></em>
  <p>February 24, 2012 -<em id="em"><a href="#">Promero announces Complex IVR Solution for Oracle CRM</a></em>
  <p>January 15, 2012 - <em id="em"><a href="#">Promero offers customized Dashboards for Oracle Contact Center Anywhere</a></em>
  <p>December 14, 2011 - <em id="em"><a href="#">Promero adds RiverStar CE Suite to Oracle Call Center Cloud Offering</a></em> 
</div>

`

4

2 回答 2

1

对于这个问题,你应该使用这个 CSS 代码

#x{
   min-height:50px;
   height:auto;
}

此样式代码导致按页面新闻最小高度大小拟合 div 高度是示例,您可以根据您的数据最好的问候

于 2012-10-08T13:56:03.787 回答
1

我不理解您的问题,但我认为您希望使用 jquery 在页面的一部分中加载新闻以处理此问题,您可以使用此代码

$("#YourElementWillLoadingNewsHere").load("YourUrl from ROOT");

此代码用于将 jquery 加载到一个元素中,希望对您有所帮助

于 2012-10-08T13:31:32.410 回答