Welcome to WebmasterWorld Guest from 54.196.232.162

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)

New User

10+ Year Member

joined:Nov 8, 2005
posts:12
votes: 0


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)

Senior Member

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

joined:Oct 1, 2002
posts:5199
votes: 0


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)

Senior Member

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

joined:Aug 7, 2003
posts:4783
votes: 0


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

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members