Welcome to WebmasterWorld Guest from 54.167.0.111

Forum Moderators: not2easy

Message Too Old, No Replies

external css and DFP (Doubleclick)

Possible to apply external css to iframe content

     

coachm

3:28 pm on Dec 21, 2011 (gmt 0)

5+ Year Member



SInce there's no ad serving forum, figured I'd try here. Been searching all over to find answer to a simple question.

I am using "third party ads" (basically just my house html ads) via DFP, and all I want to do is use the same external css file to format the ads.

I can get inline to work if each ad has the style info in it, but that's a lot of extra work. I can't get any external css to work regardless of whether it's referenced in the ad, or from the page the ad gets displayed on.

Since google uses its own iframes to display the ad, does this make it not possible? (that just can't be. I'm missing something).

TIA

penders

4:16 pm on Dec 21, 2011 (gmt 0)

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



Are these your ads that are being served to third party websites via an iframe? How do you specify the HTML to be included as part of the ad? Is it a complete document, or just a snippet?

coachm

6:19 pm on Dec 21, 2011 (gmt 0)

5+ Year Member



thanks for the reply. yes, my ads, and basically the complete ad which dfp then serves up in its own iframe. If I include a reference in the ad I enter in dfp it will style. But what it doesn't seem to do is be able to apply the stylesheet I use for the entire site, when it's specified on the site, and not in the ad.

Don't know if I'm being clear here. I want to use the same ad, but style it differently depending on which of my sites it appears on. If I have to put all the style info in the actual ad, that won't work.

So, the ads are my house ads, being served to my websites via DFP.

It would be a hell of a lot easier if DFP worked in real time. This change and test, takes like 30-60 minutes each time.

penders

7:54 pm on Dec 21, 2011 (gmt 0)

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



...dfp then serves up in its own iframe. ...I want to use the same ad, but style it differently depending on which of my sites it appears on.


If the ads are served in an iframe then I don't see how you can apply an external stylesheet to it that originates from the document that contains the iframe. Although, having said that, if the ads were on the same domain then you might be able to manipulate the contained document with JavaScript - but if they were on the same domain you'd presumably have full control over them anyway?

However, if the ads are also served from a different domain (which I assume they are), then security will prevent much interaction with the contained document.

coachm

11:26 pm on Dec 21, 2011 (gmt 0)

5+ Year Member



Thanks. I'm giving up on it, and I'll just have to include styles in each ad. I have control of the html that's served, and the page it's served on, but google serves within an iframe, which is unaffected by any original page css.

There "should" be a way...it doesn't make sense otherwise, but I've wasted too much time on it.

penders

12:15 am on Dec 22, 2011 (gmt 0)

WebmasterWorld Senior Member penders is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



Just a thought... by including an external stylesheet in the ad itself, does that work? Or is it stripped from what is served? If this does work, can you provide a querystring to the ad that is served in the iframe? The querystring could tell the ad which (external) CSS file to include, so this could vary per website - but is ultimately controlled by the ad.

There "should" be a way...


Should there? Other than the controlled way as mentioned above, is there any difference between your scenario and serving 3rd party ads? You should not be able to modify 3rd party ads since they have essentially paid for their ads to be viewed in a specific way, the way they designed it. But this comes back to the cross-domain security issue as mentioned in my previous post.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month