471,627 Members | 2,120 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,627 software developers and data experts.

making div stretch vertically to same size as neighbor div

Can someone tell me how to make a div stretch vertically so it is
always the same height as its neighbor div, while the neighbor div
expands to fit its content (like a navigation bar on the left always
the same height as the content div)?

Nov 8 '07 #1
3 6920
On 11/7/2007 10:12 PM, ru*****@fastmail.fm wrote:
Can someone tell me how to make a div stretch vertically so it is
always the same height as its neighbor div, while the neighbor div
expands to fit its content (like a navigation bar on the left always
the same height as the content div)?
I don't. Instead, I enclose the two side-by-side DIVs within another DIV.

--
David E. Ross
<http://www.rossde.com/>

Natural foods can be harmful: Look at all the
people who die of natural causes.
Nov 8 '07 #2
I appreciate the answers. I tried #1 from Ben and it definitely works,
but "neighbor" won't get deeper when "stretch" exceeds the depth of
"neighbor", so the content area always needs to be the same height as
or deeper than the navigation area for the heights to line up.

David, could you possibly provide a code example of what you mean?

Nov 9 '07 #3
On 8 Nov, 06:12, runn...@fastmail.fm wrote:
Can someone tell me how to make a div stretch vertically so it is
always the same height as its neighbor div,
Use <table This requirement is sufficient to justify using it.

Nov 9 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Finn Newick | last post: by
3 posts views Thread by matt del vecchio | last post: by
9 posts views Thread by Lyn | last post: by
16 posts views Thread by Andrea Gavana | last post: by
4 posts views Thread by Bob Altman | last post: by
1 post views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.