tags:

views:

85

answers:

2

My site supports exporting data in a few ways, and one way i via iframe.

<iframe src ="http://www.conanstats.com/Feeds/IFrame.aspx?Guild=30&amp;EventCount=15" width="270" height="400">
  <p>Your browser does not support iframes.</p>
</iframe>

Currently the problem is that when its shown in a web site its going to have its own style, is there any ways for it to inherit the style from the page its being shown in. Or do i need to make url arguments to make this happen

+2  A: 

An iframe is technically a different browser window with its own DOM and associated CSS imports. If you want to style the iframe's content put the CSS you would like to use in the file the src property is pointing to.

If it is pointing towards an ASP file change it in there.

Lenni
The problem is that other sites that i have no control over are using the iframe code. So i would like to make that as easy as posible.And im looking for a way to have to configure all the style releated items in the url
EKS
As Lenni said, framed pages are pretty much unaware of what's hosting it. Also, you should be aware that if serving framed pages from different servers, safari's default configuration stops this.
Chris Lively
IS there another way to export the html code then? Basicly it needs to be exported as html so ppl can easly cut and paste the code.
EKS
Well you could add variables to the URL which determine the styling. For example iframe.aspx?color-scheme=blue will give you a blue page.
Lenni
A: 

You could have your page take a parameter which it then uses to decide which local style sheet to load...

Chris Lively