R
Richard Maher
Hi,
Similar questions have been asked all over the place (I know 'cos I just
read most of 'em
but I'm still none the wiser so I hope someone here can
please help me.
As with a lot of people these days, I have a <ul><li> list of values
(google-esque auto-suggest) contained in a <div>. After a certain number of
entries, I wish to cap the vertical size of the list. ('Cos IE*6* doesn't
support maxHeight) I plan to just set the style.height attribute for the
<div> that contains my <ul>.
Anyway, cut a long story short, I want what en.wikipedia.org has on its
search box. The result set grows/shrinks horizontally according to the size
of the elements/text-nodes that it contains. Is this achieved with plain CSS
or is Javascript animation involved?
I currently have the <div> with style: -
position: absolute;
overflow-y: auto;
overflow-x: hidden;
width: auto;
height: auto;
and the <ul> I have: -
width: auto;
height: auto;
margin: 0px;
padding: 0px;
and everything is great with the content-based width accommodation until I
set "height" to cater for say 4 entries, at which stage the vertical
scroll-bar appears *inside* the <div> and occludes underlying data :-(
Do I have to add scroll-bar width to the div-width with Javascript?
Is there a CSS parameter/configuration that will give me wikipedia-esque
width-expansion?
Any pertinent advice gratefully accepted.
Cheers Richard Maher
Similar questions have been asked all over the place (I know 'cos I just
read most of 'em
please help me.
As with a lot of people these days, I have a <ul><li> list of values
(google-esque auto-suggest) contained in a <div>. After a certain number of
entries, I wish to cap the vertical size of the list. ('Cos IE*6* doesn't
support maxHeight) I plan to just set the style.height attribute for the
<div> that contains my <ul>.
Anyway, cut a long story short, I want what en.wikipedia.org has on its
search box. The result set grows/shrinks horizontally according to the size
of the elements/text-nodes that it contains. Is this achieved with plain CSS
or is Javascript animation involved?
I currently have the <div> with style: -
position: absolute;
overflow-y: auto;
overflow-x: hidden;
width: auto;
height: auto;
and the <ul> I have: -
width: auto;
height: auto;
margin: 0px;
padding: 0px;
and everything is great with the content-based width accommodation until I
set "height" to cater for say 4 entries, at which stage the vertical
scroll-bar appears *inside* the <div> and occludes underlying data :-(
Do I have to add scroll-bar width to the div-width with Javascript?
Is there a CSS parameter/configuration that will give me wikipedia-esque
width-expansion?
Any pertinent advice gratefully accepted.
Cheers Richard Maher