2 Replies - 8388 Views - Last Post: 20 September 2006 - 04:58 AM

#1 friedar  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 19-September 06

CSS, getting a nested div to scroll

Posted 19 September 2006 - 05:16 PM

I have a page that lays out the way I want it to, but I cannot get a vertical scroll bar when the content is too long in one of the columns. I have tried using overflow: auto or overflow: scroll, but they have no effect on the nested div. The div just streches out to fit the content, and you have to scroll the page (not good in this case).

The page is at:
http://moleculesinmo...viewer1left.htm

The css is at:
http://moleculesinmo...viewer1left.css

The div ID is "info".

I hope someone can tell me what I am doing incorrectly. Thanks for your help,

Frieda

Is This A Good Question/Topic? 0
  • +

Replies To: CSS, getting a nested div to scroll

#2 Arbitrator  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 51
  • View blog
  • Posts: 530
  • Joined: 26-January 05

Re: CSS, getting a nested div to scroll

Posted 19 September 2006 - 05:31 PM

The overflow property doesn't do anything unless you've defined the element's dimensions either implicitly or explicitly. Once the content overflows those dimensions, then whatever behavior was specified for the overflow property will take effect. In this case, the #info element needs a limitation on its height to work as you expect; for example, you could set the height property on #info.
Was This Post Helpful? 0
  • +
  • -

#3 friedar  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 7
  • Joined: 19-September 06

Re: CSS, getting a nested div to scroll

Posted 20 September 2006 - 04:58 AM

Thanks so much for your clear response. I thought I had tried specifying the height and that it had not done the trick, but when I tried it just now it works perfectly. I am very grateful to you for ending my agony on this point!

Frieda
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1