Mood Swing » Nostalgic

Journal » Post

pngfix
posted in: code at 09:47 am
0 Reactions

I accidentally stumbled upon a small inconvenience yet again as a web designer; as you can see my current design uses a flash movie under <div> elements. Normally the flash content will be on top regardless of the stacking order in your code or via z-index. It turns out setting your flash movie's window mode ("wmode") to transparent will fix the issue (only in a perfect world). Sadly this doesn't work on firefox on linux platforms, based on my reading the wmode attribute is still not supported on linux/firefox.

I've read somewhere that google was able to pull this off by inserting an <iframe> right under your <div> width the same dimensions and using a little javascript hack. Long story short the iframe must have a display property set to none at first, then set back to block once the page has loaded. I implemented this on my current layout and it seems to work. To test this you can visit browsercam.com, they offer a free trial to take screenshots of websites under different platforms/borwsers.

something like this:  
<body onload='document.getElementById("iframe").style.display="block"'>
<
iframe 
    src
="javascript: return false;" 
    
id="wmodefix" 
    
frameborder="0" 
    
scrolling="no"
    
id="iframe"
    
style="position: absolute; top: 110px; left: 220px; z-index: 5; display: none; width: 100px; height: 30px;"
</iframe>

<
div style="position: absolute; top: 110px; left: 220px; z-index: 10; display: block; width: 100px; height: 30px; border: 1px solid green; background: #fff">  
    
HTML DIV!
</
div>

<!-- 
embed flash here -->
 

Talkback

No reactions

Post a reaction



 


*Enter the characters displayed on the image below on the verify image text box above. Note that this is case sensitive.

captcha image

 
Back to top
contact