Navigate

Putting Adsense Code In the Body of Blogger Post

Blogger template has gone through changes and therefore, the earlier style of adding adsense code directly to content does not work anymore. What we need to use is <div>. Here is how now we do it:

1. Pick any content on blogger or use a new one.

On previewing the post, the ad should look like what is given below. 

Things to remember:
1. I pasted my article in the content section only after switching to html mode.
2. Using compose mode to do the same will not show the ads at all.
3. You can include the ads in the body section of all your other previous articles. Just switch to html mode This will show you lots of other codes. Locate a section that has <div> and </div>. Paste the adsense code between them. You can add the div like this:

<div style="text-align: left;"> your adsense code here </div>

The code given above will put your ads on the left hand corner of your content. To align it in the center replace "left" in the code with "center". You can also pick "right" to align it on the right side.

To make the ads float and wrap the content use:
<div style=”display:block;float:right;margin: 5px 5px 5px 5px;”>your adsense code here</div>

No comments:

Post a Comment