jquery - How do I change DFP Text Link Creative style, which is forced to display as Times New Roman from user agent stylesheet? -
we using dfp text ad creatives throughout our site, user agent stylesheet forcing display in times new roman font (see attached)
ripping out link iframe , placing dom not working option us: https://stackoverflow.com/a/16039744/2595830
the options within dfp allow change text color , not font family. more control on styling can better, have suggestions on how @ least change font-family of link?
<!doctype html> <html lang="en-us"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>test text link</title> <style type="text/css" media="screen"> body{ font-family: 'helvetica', arial, sans-serif; } </style> <script type='text/javascript'> var googletag = googletag || {}; googletag.cmd = googletag.cmd || []; (function() { var gads = document.createelement('script'); gads.async = true; gads.type = 'text/javascript'; var usessl = 'https:' == document.location.protocol; gads.src = (usessl ? 'https:' : 'http:') + '//www.googletagservices.com/tag/js/gpt.js'; var node = document.getelementsbytagname('script')[0]; node.parentnode.insertbefore(gads, node); })(); </script> <script type='text/javascript'> googletag.cmd.push(function() { googletag.defineslot('[path/to/slot]', [650, 16], '[div-gpt-id]').addservice(googletag.pubads()); googletag.pubads().enablesinglerequest(); googletag.enableservices(); }); </script> <body> generic body content<br><br> <!-- text-link --> <div id='[div-gpt-id]' style='width:650px; height:16px;'> <script type='text/javascript'> googletag.cmd.push(function() { googletag.display('[div-gpt-id]'); }); </script> </div> </body> </html>
for visiting this, able solve adding in:
googletag.pubads().enablesyncrendering();
so javascript like:
<script type='text/javascript'> googletag.cmd.push(function() { googletag.defineslot('[path/to/slot]', [650, 16], '[div-gpt-id]').addservice(googletag.pubads()); googletag.pubads().enablesinglerequest(); googletag.pubads().enablesyncrendering(); googletag.enableservices(); }); </script>
Comments
Post a Comment