On Apr 6, 2011, at 10:47 AM, Brendan Miller wrote: > The closest I can come in css seems to be setting the height of > content to 100%. However, since the > control-bar also takes up vertical space, the content sticks out the > bottom. Really what I'd like the height > of content to be is 100% the height of the container, minus the height > of control bar. > > Any suggestions on how to achieve this in css?
What you want here is the calc() function: http://www.w3.org/TR/css3-values/#calc .content { height: calc(100%-xxxpx) } /* where xxxpx is height of control-bar */ That is implemented in Gecko 2.0 (Fx 4) as -moz-calc, and will be in a next release of WebKit based browsers (Safari / Chrome). IE9 implements it without vendor prefix. https://developer.mozilla.org/en/CSS/-moz-calc http://msdn.microsoft.com/library/ms531211.aspx > Any misunderstandings > on my part? Nope, you got it right… > Is the only > way to solve this in javascript? For other browsers, that might be the easiest solution. Philippe -- Philippe Wittenbergh http://l-c-n.com/ ______________________________________________________________________ css-discuss [css-d@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/