By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,386 Members | 1,669 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,386 IT Pros & Developers. It's quick & easy.

making div stretch vertically to same size as neighbor div

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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.