I have this setup where the results are wrapped in span tags and are 'moved' using jquery into other divs. at the moment the search just returns 30 values max and it's all good but I don't feel that is a fair limitation. what I want to be able to do is scroll the div when there are more results than can be displayed, like a list box. I've tried a number of different methods but none of them seem to work very well. I'd like it to keep a fixed height too
You haven't shared any markup here but if you are willing to have a fixed height just use this
.container {
/* Optional - You can set a min-height : whatever px; for reserving some space*/
height: 200px; /* Fix a height here */
overflow: auto; /* Optionally you can also use overflow: scroll; */
}
In addition to @mr-alien answer: you can use max-height
to limit the size of a container and in the same time to make it fit the content:
.container {
/* Optional - You can set a min-height : whatever px; for reserving some space*/
max-height: 200px; /* Fix a max-height here */
overflow: auto; /* Optionally you can also use overflow: scroll; */
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With