Can I set a style for the content of an iframe from the main page?
- by Joel Coehoorn
We have a page the embeds a Google Calendar in an iframe. Recently, a warning box div began appearing on the calendar that looks like this:
<div id="warningBox" style="color:#aa0000;">Events from one or more calendars could not be shown here because you do not have the permission to view them.</div>
Obviously the best solution here is to find the private events and remove them, but so far the search for those events has proved fruitless. This calendar is an aggregate of several calendars, including a few we don't control (ie weather). We're still looking, but in the meantime, I would like to try to hide that div.
I know that iframes enforce the separation between the pages, such that the child page is pretty much a law unto itself. But surely there must be some way to set a style on an element inside the frame?