Regular readers of this blog (well, those of you who read it live and not via an aggregator like Bloglines) may have noticed that on
occasion I embed a Chitika eMiniMalls ad unit right into the text of my
blog. As I've said before,
href="http://www.makeeasymoneywithgoogle.com/blog/adsense/Chiquitita-er-Chikita-for-AdSense-Publishers.html">Chitika is a product-oriented advertising program href="http://www.MakeEasyMoneyWithGoogle.com/index.html">MakeEasyMoneyWithGoogle.com
product-oriented content, like
href="http://www.makeeasymoneywithgoogle.com/blog/adsense/AdSense-Case-Study-Adding-the-site-banner.html">yesterday's entry about creating a banner
unit as part of the blog entry itself, just like the one you see attached to this entry. Here's one way to manually add eMiniMalls to your own
postings.
First, generate the eMiniMalls code with the appropriate format. I've chosen to use the 160 by 160 format because it doesn't take over the
entire width of the posting. You'll want to choose a keyword or set of keywords that are specifically targeted to the topic of your posting, of
course. Here's one example:
<script type="text/javascript"><!--
ch_client = "EricGiguere";
ch_width = 160;
ch_height = 160;
ch_non_contextual = 1;
var ch_queries = new Array( "Invisible Fence", "hidden fence" );
var ch_selected=Math.floor((Math.random()*ch_queries.length));
ch_query = ch_queries[ch_selected];
//--></script>
<script src="http://scripts.chitika.net/eminimalls/mm.js"
type="text/javascript>
</script>
Paste that code write into the HTML for your blog entry. This assumes that you're using blogging software that lets you see and edit the
HTML directly. Put the code between paragraphs, or just after a heading. Don't put it in the middle of a paragraph.
Then wrap the code with a <div> tag like this:
<div style="margin-left: 1em; margin-bottom: 1em; float: right;"> <script type="text/javascript"><!-- ch_client = "EricGiguere"; ch_width = 160; ch_height = 160; ch_non_contextual = 1; var ch_queries = new Array( "Invisible Fence", "hidden fence" ); var ch_selected=Math.floor((Math.random()*ch_queries.length)); ch_query = ch_queries[ch_selected]; //--></script> <script src="http://scripts.chitika.net/eminimalls/mm.js" type="text/javascript> </script> </div>
You're almost done. What the <div> does is cause the ad unit to “float” to the right, allowing text to wrap around it. The
“margin-left” and “margin-bottom” properties ensure that there's a bit of whitespace around the ad unit to make it look better. (Always make
good use of whitespace in whatever you do!) If you wanted to float the ad unit to the left, you'd change the <div> to look like this:
<div style="margin-right: 1em; margin-bottom: 1em; float: left;">
These are general guidelines of course, and you may have to fiddle with the style settings a bit to get something that looks good in your
postings.
The only thing left now is to clear the float, which you can do in one of two ways. The best way is to wrap the entire posting in another
<div> that sets the “overflow” property:
<div style="overflow: auto;"> <p>This is the text of the posting. This stuff is actually pretty simple to do, you know.</p> <div style="margin-left: 1em; margin-bottom: 1em; float: right;"> <script type="text/javascript"><!-- ch_client = "EricGiguere"; ch_width = 160; ch_height = 160; ch_non_contextual = 1; var ch_queries = new Array( "Invisible Fence", "hidden fence" ); var ch_selected=Math.floor((Math.random()*ch_queries.length)); ch_query = ch_queries[ch_selected]; //--></script> <script src="http://scripts.chitika.net/eminimalls/mm.js" type="text/javascript> </script> </div> <p>This is the rest of the text of the posting. Seriously, this is easy.</p> </div>
If you can't do that, then insert an empty <div> at the end of the posting that clears the float:
<div style="clear: both;"></div>
And that's all it takes. Not that hard, really.
Note that on some blogging platforms you can get extensions (plug-ins) that will do this kind of thing for you automatically when it
recognizes special codes you insert into your entry. But it's very platform-specific.
Eric Giguere is the author of Make Easy Money with
Google, a real (printed!) introductory AdSense book for non-technical
people, available at all fine bookstores. Be sure to download the
free sample chapter for more information about the book.