div outside frame

2020-05-07 06:29发布

问题:

I have a question about divs and frames. When you have a dropdown list inside a frame, and you press the dropdown, the dropdown will be shown outside your frame. I have an alternative dropdown (it almost has the same property's but I had to display the elements next to each other), so the elements are shown in a div.

My question. Is there a way, when you press the alternative dropdown, that the div will be shown on top of the frame? To be more clear, I made a drawing. 1 & 2 are the examples I had.

1 is when I added the frame with the height and width of the yellow div. In 2: I used a larger height, but it is shown behind the next frame. I also tried to place frame 2 on top of frame 1, but then I could not select an element in my alternative dropdown.

The only solution with those dropdowns was when I worked with frames, it's no option to say: work with divs.

I hope there is someone who has an idea how to solve this problem?

This is the code I use now:

    <div id="site_content">
    <div class="site_Wrapper">
        <div id="test">
            <div id="content">
                <?php if (substr(fruit,0,4) == "apple"){    ?>
                    <iframe name="resultaat" src="/fruits/apple.php?<?php print FRUIT; ?>" id="resultaat" width="660" height="250" frameborder="0" scrolling="auto" marginwidth="0"></iframe>
                <? } else { ?>
                    <iframe name="resultaat" id="resultaat" src="/fruits/empty.php" width="660" height="250" frameborder="0" scrolling="no" marginwidth="0"></iframe>
                <? } ?>
            </div>
            <div id="BB_Wrapper">
                <iframe name="vulin" id="vulin" src="/fruits/healty.php" width="280" height="370" frameborder="0" scrolling="no" marginwidth="0"></iframe>
            </div>
        </div>
        <div class="clearFloat">&nbsp;</div>

    </div>
</div>

Thank you so much in advance!!

回答1:

Is there a way, when you press the alternative dropdown, that the div will be shown on top of the frame?

No. Select elements are native UI controls. Div elements are just part of the page.

The closest you could come would be to have a duplicate div in the framed page and line them up very very carefully. (That way lies madness).



标签: html frame