slothy
07-22-2004, 12:34 PM
Hi all,
I having a wrapper DIV (certain width say 400px) and i have some child DIVS which i want to add to it. And i want it to have a maximum height of 600px say.
I DONT want the wrapper DIV to have vertical scroll bars so i would like to add as many child DIVS (which contain text of indiscriminant length) until i can somehow detect that the wrapper has overflowed (ie the scrollbars have been implemented !) if it has then remove the last one and dynmically create a new DIV, and continue the cyclw until exhausted of child DIVS.
Have i explained it lucidly enuf? Hope so :confused:
so.....
(Question 1)
Is it possible to detect 'on the fly' that a DIV has acquired scroll bars? and if so how !!
(Question 2) Related
if i have a wrapper div, say with id wrapperDiv (amazing imagination ;) ), populated with child divs, childDiv1, childDiv2, childDiv3, (added using DOM)etc and a child div is not in view how can i scroll so a invisible div, not currently in view, comes to be displayed the top of the wrapperDiv?
I beleive i can use something like scrollTo?? I seem to be confused how to get a child element, specifically, to be moved to the top of the view :confused:
Thanx in advance
I having a wrapper DIV (certain width say 400px) and i have some child DIVS which i want to add to it. And i want it to have a maximum height of 600px say.
I DONT want the wrapper DIV to have vertical scroll bars so i would like to add as many child DIVS (which contain text of indiscriminant length) until i can somehow detect that the wrapper has overflowed (ie the scrollbars have been implemented !) if it has then remove the last one and dynmically create a new DIV, and continue the cyclw until exhausted of child DIVS.
Have i explained it lucidly enuf? Hope so :confused:
so.....
(Question 1)
Is it possible to detect 'on the fly' that a DIV has acquired scroll bars? and if so how !!
(Question 2) Related
if i have a wrapper div, say with id wrapperDiv (amazing imagination ;) ), populated with child divs, childDiv1, childDiv2, childDiv3, (added using DOM)etc and a child div is not in view how can i scroll so a invisible div, not currently in view, comes to be displayed the top of the wrapperDiv?
I beleive i can use something like scrollTo?? I seem to be confused how to get a child element, specifically, to be moved to the top of the view :confused:
Thanx in advance