Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Help: Override iframe’s content CSS

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #25278
    Pok3
    Member

    I’ve googled a lot for it with no success.

    I have a page "A", that contains a iframe "B".
    Can i overrride the CSS of the iframe "B" with the CSS from the container page "A"?

    I’m pretty sure that i can be done with a little bit os JS, but how?

    #59787
    Chris Coyier
    Keymaster

    I’m pretty sure that it can’t be done. It’s a security thing. Think if someone created a website that was just one big giant iframe of your website, only changed the CSS to look a little different. Problematic.

    #60181
    Pok3
    Member

    Yeah, the security issue makes sense.
    I’m quetioning cuz in my job we use an web based software to manage "bluetooth hotspots" . (Sounds Strange but it works)

    This software have a (very poor) api, that works via http post and get functions, and reply only as a white page with all the response lines in a <pre> tag. So i did a little test ( only to show for my boss that the API sucks) creating a page with form that targets itself, and echo the values inputed into the src of a iframe, so it loads those ugly logs without changing the page.

    My intent was only make the iframe black* and the characters green. (Console-like got it?)

    * got the black iframe setting allowtransparency="true" and putting it into a blck <div>, but the font color was black to, sice is the default color on <pre> tags. :(

    Anyway, thanks for the reply Chris.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.