Posted in CSS but there are 3x as many people viewing this forum... I've been trying to figure out how to float an ad in the middle of my articles, without having to actually put code in between article text. Here's a picture of a mockup for more info: See how the article flows around the ad box on the top and bottom? From what I'm reading about floats, I have to break it up, like Article text blah blah blah lots of stuff here.... <div class="adbox"> Ad Link 1 Ad Link 2 etc. </div> the rest of my article continues here... Code (markup): Is there any way to do it without sectioning the article? Thanks in advance.
Yes - d0 this - <span style="float: left; padding: 0px 15px 1px 0px"> <script type="text/javascript"><!-- google_ad_client = ""; google_ad_width = 336; google_ad_height = 280; google_ad_format = "336x280_as"; google_ad_type = "text"; google_ad_channel = ""; google_color_border = "FFFFFF"; google_color_bg = "FFFFFF"; google_color_link = "3300CC"; google_color_text = "666666"; google_color_url = "4C4C4C"; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> </span> PHP:
sundaybrew, That doesn't work. The article doesn't flow around the top of the ad box; there's an empty space there. Like: article............ ................... adbox ................... adbox ................... adbox ................... adbox .................................. .................................. .................................. Code (markup):
Yea - This will work like this http://www.hotsauceknowledge.com/tarditional-hot-sauce/franks-hot-sauce.html There is no way to make it float top, middle , and bottom Its just impossible for me at least
For those of you running WordPress that want to do the same thing as I did, you can go to this URL and download Adsense Manager for WordPress. This plugin allows you to manage your ads through the WordPress admin menu. For me, I added a < div > block around the ads via the "markup before" and "markup after" sections, and styled it in my style sheet with a float. Once that is done, all you have to do is insert < !--adsense -- > into your articles wherever you want an ad to appear.