Welcome to WebmasterWorld Guest from 54.157.222.62

Forum Moderators: not2easy

Message Too Old, No Replies

How to edit the appearance of the adsense-referral text link

   
3:53 am on Jan 6, 2007 (gmt 0)

5+ Year Member



I use adsense referrals (links to google products and services). For example, here is the code of the text link "Get photo software from Google":

<script type="text/javascript"><!--
google_ad_client = "pub-1234567890";
google_ad_output = "textlink";
google_ad_format = "ref_text";
google_cpa_choice = "CAAyI_AEaCL_IbiZuSueDKm7oMB";
google_ad_channel = "";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

I have css-class "smalltextbottom".


.smalltextbottom {font-family: Arial, Helvetica, sans-serif; font-size:11px; font-weight:normal; color: #FFFFFF;}

How to change the default format of the text link in such a way that it is written using the properties of the my css-class? To be exact I want the text link "Get photo software from Google" to be written with these properties {font-family: Arial, Helvetica, sans-serif; font-size:11px; font-weight:normal; color: #FFFFFF;}. How to realize it? Thank you!

[edited by: encyclo at 3:58 am (utc) on Jan. 6, 2007]
[edit reason] obscured pub-id [/edit]

1:12 pm on Jan 7, 2007 (gmt 0)

WebmasterWorld Senior Member suzyuk is a WebmasterWorld Top Contributor of All Time 10+ Year Member



you could wrap the whole script in a div with your class name, then target the <a>, anchors inside that div (the one the script generates)

e.g.

<div class="smalltextbottom">

<script type="text/javascript"><!--
google_ad_client = "pub-1234567890";
google_ad_output = "textlink";
google_ad_format = "ref_text";
google_cpa_choice = "CAAyI_AEaCL_IbiZuSueDKm7oMB";
google_ad_channel = "";
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

</div>



CSS:

.smalltextbottom a {
font-family: Arial, Helvetica, sans-serif;
font-size:11px;
font-weight:normal;
color: #F00;
}

.smalltextbottom a:hover {
color: #00f;
}

Note:
However I'm not sure if this is allowed or if it falls under the "Code Modification" adsense rule, perhaps some of the more knowledgable adsense'rs can clarify that.

Suzy

12:18 am on Jan 9, 2007 (gmt 0)

WebmasterWorld Senior Member swa66 is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Ask permission from adsense before even trying to modify the looks. AFAIK it's outlawed in the ToS.