• I have to say I’m a I’ve been working on this for a few hours. I was successful in embedding an iframe to display our products, but I cannot figure out for the life of me why the I-frame is 150 pixels in height. I want the I-frame to be the height of the page that I embedded. I am trying to figure out what is setting the height to 150.I figured out several different solutions to fixing this issue using CSS, but I don’t like any of them. But my biggest issue is figuring out why it is 150 pixels to begin with.

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    How are you adding the ifames from vtinfo?

    Thread Starter astima

    (@astima)

    Our parent company provided us with script to enter into our header (which took me a while to figure out how to do). Could one of the scripts be what is causing it to be 150 pixels.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    It certainly could be. Talk to the developer(s) of that script.

    Thread Starter astima

    (@astima)

    Below is the only code I saw that refers to height in the script. I don’t fully understand it.

     currentViewportWidth = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
          currentViewportHeight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
          document.getElementById('brand-builder-iframe').contentWindow.postMessage({
            width: currentViewportWidth,
            height: currentViewportHeight
          }, '*');
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    just for fun, try changing it to “height: 100%”.

    Thread Starter astima

    (@astima)

    Where exactly should I change the height?

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    in the script.

    Thread Starter astima

    (@astima)

    So I would change the code to this:

    currentViewportWidth = Math.max(document.documentElement.clientWidth, window.innerWidth || 0);
          currentViewportHeight = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
          document.getElementById('brand-builder-iframe').contentWindow.postMessage({
            width: currentViewportWidth,
            height: 100%
          }, 
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Yeah, try it and see what happens. If it breaks stuff put it back to what it was and talk to the developers of the script.

    Thread Starter astima

    (@astima)

    Unfortunately, it did not work. But I appreciate all your help

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Change Iframe size’ is closed to new replies.