Invisible IFrame

November 2nd, 2009 by Alex Leave a reply »

Iframes become less and less used nowadays, but sometimes there’s only one way to get something working as expected – using iframes. Sometimes, we need to run some background content (e.g. music, counters) and hide it from people.

In this case, we need to make the iframe 0px width and 0px height. Here is the code for it:

<iframe src='page.html' width='0' height='0' frameheight='0' framewidth='0' frameborder='0'></iframe>

You can add a name attribute for the iframe and load other background music or other stuff while browsing the main page.

This page can be found by searching for:

invisible iframe



Comments are closed.