css3 - Css–selector for when a html-document is inside an iframe? -


I am trying to create a CSS-selector that specifies the appropriate places depending on the weather, Whether or not the html is inside an iframe I tried to do this:

  html: not (: root) body {background: black! Important; }  

I hope that if it is inside an iframe, then this body is background: black; to apply, but it is not so, why? And what are the CSS options? HTML is root so I can always check with javascript.

IE8 not requierd support

CSS is scotched only in one document. An IFrame is a complete document in itself, and therefore a CSS rule that applies to the page that contains if iframe can not be applied to the page that within That iframe

This means that as far as HTML and CSS are concerned, html always : root (and therefore be : not (: root) ).

Unless you are able to transfer this CSS from that page into the page within the iframe script for example), I do not believe that there is just one way to use CSS.


Comments

Popular posts from this blog

eclipse plugin - Run java code error: Workspace is closed -

ios - How do I use CFArrayRef in Swift? -

scala - Play Framework - how to bind form to a session field -