Enable scroll on single div?
I have a layout that looks like this:
<html> <head> stuff here </head> <body> <div id="master"> <div id="toolbar"> <input type="text" id="foo"> </div> <div id="content"> a whole bunch of content in here </div> </div> </body> </html> '# master' is a container for the jquery user interface dialog box. I would like the contents of the "#content" div to be scrollable, but for the "#toolbar" it would NOT scroll. Is this possible with the jquery UI dialog box?
+4
2 answers
Just use the css rules:
#content { overflow: auto; height: [desired height] } Where you might need to use jQuery if the modal has dynamic height. In this case, on the open modality, you can set the height of the inner container. Sort of:
open: function(){ var modalHeight = $('#master').height(); $('#content').height(modalHeight - [footer and title]); } +10