0

In Google mail I can add my own app. But it's in an IFrame. The parent of the IFrame has a gray background-color.

(class="hi")

I want to change that color.

Is it possible that I can style the parent that's outside the IFrame from the IFrame itself?

gr.

Nijin Narayanan
  • 2,269
  • 2
  • 27
  • 46

2 Answers2

0

You can not apply CSS to HTML that is loaded in an iframe which is coming from another site (in your case Google Mail)

You can only style your iframe content when you have access to edit that iframe page.

Felix
  • 37,892
  • 8
  • 43
  • 55
0

This is only possible if your own app is from the exact same domain as the maps.

For example: If your domain is apps.google.com and the map is from maps.google.com then it won't work because of the same origin policies in browsers.

You are only allowed to modify your "own" content. A browser assumes your content is yours if it's from the same domain. Any different domain and you're simply not allowed to make any style of modifications.

If you wish to change the styling you would need to load all data from maps via a proxy to make it appear as if it's from your own domain(eg with a curl call). But there are a myriad of complications to go with that.

Tschallacka
  • 27,901
  • 14
  • 88
  • 133