div lengths

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • philleep
    New Member
    • Mar 2007
    • 74

    #1

    div lengths

    Hi,

    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?

    cheer,
    Philleep
  • drhowarddrfine
    Recognized Expert Expert
    • Sep 2006
    • 7434

    #2
    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.

    Comment

    • philleep
      New Member
      • Mar 2007
      • 74

      #3
      i've tried to used the height funmction before but it never seems to work - cheers for the tip tho...

      Comment

      • drhowarddrfine
        Recognized Expert Expert
        • Sep 2006
        • 7434

        #4
        Height depends on other elements being set which is why it sometimes appears not to work.

        Comment

        Working...