Thursday, February 4, 2010

AdSense Layouts: using tables, not too many Divs

This article has details about laying out AdSense ads side-by-side with the text in your Blogger postings.

Previously I've explained how to put an AdSense ad-unit "in-line"  in your blog post.   Using this approach,  the advertisement is put in a block of its own, and your content starts again underneath it.

However you can use DIV statements to allow your text to flow around the ad.  I've described how do use this approach for putting text and pictures side by side in your blog, and it could easily be used for ad-unit code instead.

That said, in Jan 2010, AdSense's blog gave advice to:
"avoid embedding the ad code in excessive div tags or nested frames".   
They didn't say what counts as excessive - but just in case, it may be a good idea to use a separate div for the ad rather than embedding <div> statements.

If you do want to put an ad and your content side-by-side, it may be better to use a table to lay them out.  To achieve this, you need to edit the HTML behind the post.  To get to this click on the HTML button in the top right of the editor (post Sept-2011 Blogger) or the Edit HTML tab in the top right of the editor (pre-Sept 2011 Blogger).

Use a piece of HTML code like this:
<br />
<table border="0" style="width: 100%;">
<tbody>
<tr>
<td>PUT THE POST TEXT IN HERE </td>
<td>PUT THE AD-TEXT IN HERE </td>
</tr>
</tbody></table>


Related Posts:



AdSense Troublehooting hints-and-tips overview

Puutting text and pictures side by side in your blog

How to put an AdSense ad-unit "in-line"  in your blog post

Using a table to display data in your blog



adsense

0 comments:

Post a Comment

 
 
Copyright © blog
Blogger Theme by Blogger Designed and Optimized by Tipseo