Tip for iframe users

MKJ

Fledgling Freddie
Joined
Jun 5, 2004
Messages
1,196
I use iframes a great deal on my site. I find it is so easy to update pages that are inside the iframes rather than mess about with one page and messy divs etc. But there has always been a problem when you use a dark background - white flashes on loading of the iframe page. Now this don't bother many I suppose but annoys me because most of the time I am working on my site with tired eyes. Nothing worse than white flashes when you are used to looking at a dark background. Well I have finally found a way around this by using semi transparency for the div that holds the iframe. The semi-transparency extends to whatever is put inside the div so it makes the iframe page semi-transparent as well. There is code available that you can use to adjust the level of transparency. This is ideal because you can adjust the amount of transparency just enough to remove the really bright white flash but not enough to make the iframe content appear much darker than the rest of your site. This code works in IE, Firefox, Netscape though Opera (not sure about the latest version) ignores the code. Control of the div colours etc can be achieved through css, so you add this code to the div settings in your style.css file:

background-color: #000;
filter:alpha(opacity=90);
-moz-opacity:0.9;
opacity: 0.9;

The above will just take the edge off the white flash and is adjustable by altering the 0.9 and 90 figures. Works perfectly for me :) .
 

Users who are viewing this thread

Top Bottom