Help with iframe - fixed width and height iframe, drop down menu hidden

From C++ to PHP, debugging to webhosting; help and discussion about writing your latest program to running your website. NOT for help when your PC won't work.

Announcements Posted on
Sign in to Reply
  1. Aack's Avatar
    • Banned
    • Location: Podex perfectus es
    • Posts: 6,197
    • Warning points: 1000
    Help with iframe - fixed width and height iframe, drop down menu hidden
    Hi guys

    Hoping someone can help me solve an issue I'm having with iframes. I will try my best to explain it clearly.

    I am combining a header and footer of one website with the content area of another. I've done this by using an iframe and set the width to 100% and the height to the specific height / space it uses.

    The problem is that the iframe used in the header area also has a drop down menu navigation, so when the menu is hovered over, the drop down menu works as expected, but it's obviously hidden due to the iframe being fixed in height.

    I was thinking that z-index could help me, but it doesn't.

    Any one have an idea on how to get the overflowing content from the iframe header drop down menu to load on top of the content below it? Or am I wasting my time?

    Thanks for reading!
  2. estel's Avatar
    • TSR Idol
    • Location: Bristol
    • Posts: 9,352
    Re: Help with iframe - fixed width and height iframe, drop down menu hidden
    You're wasting your time. For a number of security reasons, it's not possible to do this with an iframe. A better solution might be to load the subpage's content using javascript to inject it into your DOM.
  3. addylad's Avatar
    • TSR Demigod
    • Location: Cheshire
    • Posts: 5,313
    Re: Help with iframe - fixed width and height iframe, drop down menu hidden
    Not sure whether you could use PHP to include it directly in your page. Or maybe AJAX/JS to detect that the drop-down menu is open, and expand the iframe gracefully.
Sign in to Reply
Share this discussion:  
Useful resources
Article updates
Moderators

We have a brilliant team of more than 60 volunteers looking after discussions on The Student Room, helping to make it a fun, safe and useful place to hang out.

Reputation gems:
The Reputation gems seen here indicate how well reputed the user is, red gem indicate negative reputation and green indicates a good rep.
Post rating score:
These scores show if a post has been positively or negatively rated by our members.