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

div lengths

P: 74

I have 2 vertical div's that are parrallel to each other. The both have; padding:10px; margin:10px; background-color:#FFFFFF;. So you can see the body background between the div's. The left div is a menu bar so has a set length. The right div contains the main content and hence the height of this div varies dependant on its content.

Ideally i want these divs to be the same length. can anyone tell me how i do this so that the menu div height is the same as the content div?

Apr 25 '07 #1
Share this Question
Share on Google+
3 Replies

Expert 5K+
P: 7,435
Google for "faux columns" as one method. Other ways include creating a wrapper div around the two inside divs and setting the height of the wrapper. Then making the two inside divs height:100% of the parent.
Apr 25 '07 #2

P: 74
i've tried to used the height funmction before but it never seems to work - cheers for the tip tho...
Apr 27 '07 #3

Expert 5K+
P: 7,435
Height depends on other elements being set which is why it sometimes appears not to work.
Apr 27 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.