homepage Welcome to WebmasterWorld Guest from 54.166.111.111
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

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




msg:3210160
 3:53 am on Jan 6, 2007 (gmt 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]

 

SuzyUK




msg:3211208
 1:12 pm on Jan 7, 2007 (gmt 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

swa66




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

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved