iframing in header that has CSS dropdowns in it - good solution to get the dropdowns outside of the iframe?
I'm working on migrating a fairly large site to a new framework, but we're doing it in separate stages, so I'm trying to find a good way to wrap the current layout around my new framework. Ideally, a simple structu开发者_如何学Cre like this would suffice:
<body>
<iframe src="old_framework/top.php" />
<div id="main_content"></div>
<iframe src="old_framework/bottom.php" />
</body>
Problem being that top.php is a menu with CSS dropdowns and they need to overlap #main_content.
I get that I can't break out of top.php's iframe like that, so this structure will not work, but I'm curious if anyone has encountered a similar situation and found a workaround.
I think the problem with the iframes cannot be fixed!
Another way to solve the problem could be removing iframes and, for example, try to do this way:
<body>
<div id="top"><?php include_once("old_framework/top.php"); ?></div>
<div id="main_content"></div>
<div id="bottom"><?php include_once("old_framework/bottom.php"); ?></div>
</body>
Honestly, using php (or similar) includes will save you a lot of headaches. Iframes aren't used much any more and are nothing but trouble in my experience.
I appreciate the comments from everyone. I wound up just totally re-implementing the old layout in my new framework. Took a little bit, but definitely less hacky than any other solution.
@Joel Etherton: I actually audibly LOL'd when I read your comment. Rest assured, I won't be receiving said award now.
精彩评论