Height of one div depend on another?

Discussion in 'JavaScript' started by pHrEaK, Jul 11, 2012.

  1. #1
    Hello, what I've got going on is a div that has a height that depends on the content inside the div (dynamic height based on content). Then to the left of this div I have a menu that only has a few buttons in it so I've been making the height absolute by using the height property of css, but as you can guess this is not going to work. I need to get the height of the first div and apply it to the second div. I ran across this thread and thought I was onto something but whenever I try to implement a similar solution it doesn't seem to work.

    Does anyone else know of different way to accomplish this???:confused:
     
    pHrEaK, Jul 11, 2012 IP
  2. smbat.yeranyan

    smbat.yeranyan Greenhorn

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #2
    if your using jquery you can try $(this).parent.height()
     
    smbat.yeranyan, Jul 11, 2012 IP
  3. pHrEaK

    pHrEaK Active Member

    Messages:
    147
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #3
    I tired a version of this with no luck...I'm going to do a bit of experimenting and get back to you. Thanks for the reply
     
    pHrEaK, Jul 18, 2012 IP