PDA

View Full Version : IFRAME and z-index



SJP
09-06-2003, 06:17 PM
I've made several comments by now in different posts complaining the the z-index property in Konqueror appeared to be broken. Well I download Opera 7 and it does the samething. So I did a little digging and discover that most browsers except IE5.5+ and NN7 won't honor the z-index property when applied to an IFRAME. That's too bad. Fortunately my little boxes that pop out of no where when you click on a menu item aren't very big so while they're partly obscured by the IFRAME not enough so to make them completely unusable. It's too bad the W3C in their infinite wisdom did away with the SRC property of the DIV tag. So much for the alternative...:-(

SJP

gbanse
09-06-2003, 07:32 PM
Have you tried using a different DOCTYPE declaration? See this discussion (http://www.webmasterworld.com/forum21/77.htm) for more.

SJP
09-08-2003, 12:44 AM
I've since learned that a few of the browsers like Opera 7 and IE5 don't allow you to do this either. Rather than put up with it looking shitty on some browsers I changed my method. Now I just "push" the IFRAME out of the way. It's not as elegant, but at least it's compatible and actually things worked out for the better, because I was able to consolidate my scripts. I'm not too keen on misrepresenting my HTML with a doctored DOCTYPE to enable me to use a deprecated feature such as the SRC property of the DIV element. And I understand that some kind of new browser won't honor HTML 4 tags unless you declare the content to be just that. So this hack would be prone to break.

SJP

gbanse
09-08-2003, 08:03 AM
Understood. I wasn't suggesting you try a hack but rather that a different DOCTYPE might accomplish what you were looking for. But I admit I don't use IFrames so I don't have a ready solution or experience to offer.

SJP
12-24-2003, 06:55 AM
Well I thought this the most appropriate place to make the announcement that I've abandoned IFRAME all together. I recently found another draw back I couldn't ignore. IE wasn't updating it! Screw it. I've gone back to using frames. They're not as pretty, but everybody supports them and more so than IFRAME - consistently.

SJP

SJP
03-20-2004, 10:43 AM
So I thought I would revisit this topic and tell you I finally found a good use for IFRAME. It always bothered me that I had to use a seperate page to display the outcome of submitting a form regardless how lengthy it was. Often in my case it would be a one line error message informing the user why their submission could not be completed. What I did was enclose the IFRAME in a DIV block and give it a name so I could tell <FORM> to use it for output. Initially the display value of the <DIV> is set to "none" and right before it is needed I set it to "block" via the onsubmit event handler. I also included a link that appears atop the IFRAME giving the user the option to make it disappear. So I'm over simplifying. I actually had to jump through some hoops (arrange things differently), because some of the browsers I'm adamant on being compatible with (IE6, Opera 7, Netscape 7, Firebird, and a couple others that probably have a snow ball chance in hell of ever becoming widely used) appeared to have race problems. For instance Opera wouldn't even create the IFRAME unless the <DIV> was initially set to "block" and Netscape and Firebird and the other gecko generation browsers wouldn't execute my javascript to turn off the <DIV> (to fix the Opera problem) in the beginning unless the routine for doing so wasn't in the javascript source file. Go figure. So if you really want to see what I did I invite you to take a look at the HTML file (http://www.sanjuanpersonals.com/home.html). The advantages are numerous, but one of the greatest is that if the browser doesn't support IFRAME then the page I tell <FORM> to redirect the output to is automatically created and abeit from being hoaky works fine. Maybe there are others "out there" that will find value in this. I don't know. The norm seems to be a straight forward web page and humans do all the work whereas my philosphy is to offload as much as possible onto the computer and leave very little for humans to do. Kind of the opposite.

SJP

WestHost - MMellor
03-29-2004, 08:23 AM
Hey SJP,

That is great you found a good use for IFRAME. Thanks for posting that and let us know if there is anything we can do to help.