I'm using DOJO's ContentPane module. I have a div element in one of the panes and I need to give it a certain height - 100 pixels less than the height of the ContentPane so that the div changes its height dynamically when you change the ContentPane size by dragging the splitters. I'm new to Dojo and would be happy if somebody could help me with this.
Thanks.
I think the best solution is via nested
BorderContainerswith properly setsplitters, because that waydijit/layoutwill take care of resizing and you won't need to write any JavaScript code and your layout will be based solely on CSS.It's kinda cumbersome to explain, so I created a working example for you at jsFiddle: http://jsfiddle.net/phusick/Ayg8F/ + a diagram:
NB: Do not forget to set
height: 100%forhtml,bodyand the topBorderContainer.The drawback of this solution is you will have to replace plain
divswithContentPanes. If you do not want to or can't you can usedojo/aspectand connect toBorderContainerorContentPaneresizemethod and resize yourdivsmanually whenever the size changes: