header content size

19 views
Skip to first unread message

Jonathan Buford

unread,
Jul 5, 2009, 10:45:36 PM7/5/09
to jLayout
Hi,

I'm using the plugin to do an application layout that frequently has a
container with a header of some fixed content, and then a body that
has variable sized content that needs to fill the rest of the space
and scroll if it goes over. I want the body to be scrollable, but the
header stays fixed in place. This type of container is being used in
several areas of the same layout, so it is nested within other layout
areas.

Generally this is working out fine, but I'm looking at what is the
best way of setting the header height so that it will resize if the
content changes size during a window resize. One approach is to set
the height of the header to be equal to the total height of the
children, but I wanted to see if there is some other way of dealing
with it that I'm not seeing.

Thanks,

Jon

Bram Stein

unread,
Jul 6, 2009, 6:27:49 AM7/6/09
to jLayout
Hi,

I'm not sure if I understand your requirements correctly, but you
should be able to get it to work without setting a size for the header
at all. If there is no size, it will automatically take the size of
the child elements. If those change, you should recalculate the layout
and the size of the header should change accordingly. If you like to
have a minimum and maximum height for the header, you can set this in
the CSS, and the plugin should take that into account. Manually
setting it---as you suggested---should also work of course.

If I misunderstood your problem, could you please provide a simple
example, and hopefully I can help you further.

Bram
Reply all
Reply to author
Forward
0 new messages