We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7455
    • 2,204 Posts
    We are working on a website that actualy holds 3 websites in 3 columbs insite ...(aahh) Iframes) I know not realy xhtml standarts etc.. but we could not find another way to do this.

    look at http://bruynes.1-vision.nl/
    as you can see there are 3 iframes with in them a document including menu, but because the menu’s are not all way’s the same number of items the content needs to be flexible but filling the whole page even when you scale the page. if the height of the menu would never changed (like adding a page in the root would do) tha I can use a pice of js that calculates the vieuwport and extract the height of the menu and footer /header and feed the result to the css.

    so if there a way to get the current height of the menu (ul or surounding div) then I could use this in the js to get the right height, but I could not figure out how to do this.

    Thank you in advanced and if this problem could be soved without javascript even better.

    Dimmy
      follow me on twitter: @dimmy01
      • 29181
      • 480 Posts
      eek...
      document.all['navmaarten'].offsetHeight


      should return the height of the navmaarten div

      I take it you have no influence over the content of each of the 3 sites? looking at the source of them it would appear that they are done with Modx too? if you can influence those pages then I’m sure we can work something else out.

      Javascript really isn’t a very nice solution at all.

      Taff
        Adrian Lawley: www.adrianlawley.com
        • 7455
        • 2,204 Posts
        I do have influence We made them also its actually all one modx instalation with 3 folders one for each "column" the idea is that each column must remeber the content and menu item thats why I used iframes. I am open to any way to do this a better way.

        Dimmy

        ps i tryed this : <script>alert(document.all[’navada’].offsetHeight);</script> but i get this error:
        document.all has no properties.
          follow me on twitter: @dimmy01
          • 29181
          • 480 Posts
          My Apologies
          document.getElementById('NameOfDIV').offsetHeight


          As to a different approach I noted that you are placing the content div above the the menu div in the markup (possibly for SEO reasons?)

          If you decided to place the divs in their order of appearance you could do away with all the javascript couldn’t you?

          Maybe I’m missing something, but all the best anyways...I tested the JS this time. smiley

          Good luck with the rest of your project,
          Taff

            Adrian Lawley: www.adrianlawley.com