title: CSS height dependent on other div height
body: <p>I have a website, with horizontal menu on top with submenu.
  Below is main div and footer.
  I want to set my submenu max-height equeal to main div height (with is different on each page, depending on content) to not let it go over footer.
  Is it posible to set css property of on element, depending on other element property?</p>
  
  <p>Thank you in advance for you help</p>