View Full Version : javascript auto-adjust - question, no code involved

Jul 3rd, 2009, 03:00 AM
Hey I was wondering, I have a box with tabs at the bottom. As you click the tabs, different stories appear in the box. However, I have the box in a fixed length. So if stories are longer, then they disappear beneath the visible line of the box. When I had it auto-adjusting though, the box would change based on the story I was clicking on. It gets weird.

Is there a way to have the box auto-adjust based on the largest amount of text and have it stay that height regardless on what story you pick?

I hope this makes sense. Thanks!


Jul 3rd, 2009, 07:34 AM
yeah that's possible

Jan 20th, 2011, 08:51 PM
Try this html code by Quackit.com. Adjust the size using the height and width:

<!-- HTML codes by Quackit.com -->
<div style="height:180px;width:475px;overflow:scroll;border:9px solid #0ADA0A;">Analysts Raise 2011 Economic Forecasts<p/>
Following a recent upswing in employment, a new poll of 80 economists suggests the U.S. gross domestic product (GDP) will likely rise 3% in 2011, up from a consensus forecast of 2.3% in November. Data from Reuters also shows growth expectations for the first and second quarters of 2011 have increased dramatically as well, jumping to 3.2% from 2.7% and 2.8% respectively in last month's poll.<p/>
American Solutions For Business<p/>

Besides positive labor reports, economists cite improving retail sales, plus growth in the U.S. services and manufacturing sectors, as reasons for the better outlook. These economic trends have some notable firms, including Goldman Sachs, forecasting even greater 2011 growth. “The upgrade in view has been due to better data, more fiscal stimulus in 2011 than we had expected – particularly the payroll tax cut which was not anticipated, “said Andrew Tilton, economist at Goldman Sachs, which is predicting a 3.4% GDP gain this year and 3.8% rise in 2012.<p/>

While economists expect the GDP to jump in 2011, forecasters don’t see the Federal Reserve raising interest rates until next year at the earliest. Currently, interest rates are near zero.
Additional data from a separate poll, conducted by NBC and the Wall Street Journal, shows Americans are becoming more confident about the economy. About 40% of respondents believe the U.S. economy will improve in the next 12 months, up eight points from December. Also, the majority of Americans (53%), now feel the U.S. will be better off five years from now, an improvement of 16 percentage points from last August.
<p style="font-family:verdana,arial,sans-serif;font-size:14px;"><a href="www.FreeTGRbook.com/CACPromotional">--
P.S. Want a Free Think and Grow Rich Book? It's Already Created a Million Millionaires... I've Got a Copy Reserved For You At