homepage Welcome to WebmasterWorld Guest from 54.145.209.80
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Google / Google AdSense
Forum Library, Charter, Moderators: incrediBILL & jatar k & martinibuster

Google AdSense Forum

    
Wrapping Text Around Adsense
How to position ads within text
thvi

5+ Year Member



 
Msg#: 6184 posted 11:43 pm on Apr 15, 2005 (gmt 0)

Does anyone have any pointers for code that will allow text within an article to flow around the Vertical Banner (120 x 240) or the Button (125x125)to the left or the right?

Thanks!

thvi

 

Never_again

10+ Year Member



 
Msg#: 6184 posted 11:54 pm on Apr 15, 2005 (gmt 0)

We place our AdSense code in a table.

adsensenoob



 
Msg#: 6184 posted 12:02 am on Apr 16, 2005 (gmt 0)

i usually wrap the ad code in a div and float it right or left.

example:

<div style="float:left">
google adsense code
<div>

thvi

5+ Year Member



 
Msg#: 6184 posted 12:08 am on Apr 16, 2005 (gmt 0)

Thanks for your replies! adsensenoob, could you please give a further example, using some text? I'm a SUPER html noob.

Many thanks,

thvi

hyperkik

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 6184 posted 1:18 am on Apr 16, 2005 (gmt 0)

thvi, do you use cascading style sheets (css) for your site?

annej

WebmasterWorld Senior Member annej us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 6184 posted 2:32 am on Apr 16, 2005 (gmt 0)

If you want a little margin around the ad do this. You can change the px to more or less.

<div style="float: left; margin: 5px 5px 5px 5px;">
copy adsense code here
</div>

This is an inline form of CSS.

thvi

5+ Year Member



 
Msg#: 6184 posted 3:16 am on Apr 16, 2005 (gmt 0)

Thanks for your replies. hyperkik, we do use css, Thanks annej for your code! We will give it a try. If anyone could take a look below at this example and show us where to put the code you suggest, that would be great!

Many thanks,

thvi
<snip>
</body>

</html>

[edited by: Brett_Tabke at 11:43 pm (utc) on May 3, 2005]
[edit reason] Thanks - we do english here and english alone. [/edit]

hyperkik

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 6184 posted 4:03 am on Apr 16, 2005 (gmt 0)

Since you use CSS, I would suggest defining an ID for each AdSense block, rather than defining the float and margin in your html, such that you can more easily make sitewide changes in the layout. The best location for your ads will vary depending upon your content and the rest of your layout, so I suggest experimenting a bit. (For example, some have suggested that a large ad block at the top of the text gives the best returns; others find that wrapping the text around an ad block after the first or second paragraph is best.)

annej

WebmasterWorld Senior Member annej us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 6184 posted 5:28 am on Apr 16, 2005 (gmt 0)

thvi,
Put it just before the <P> of the paragraph that is about where you want to ad to be. The top of the ad will be even with the beginning of that paragraph and the text will wrap around it. If you said "right" it will go to the right and if "left" it will go to the left.

Never_again

10+ Year Member



 
Msg#: 6184 posted 2:55 pm on Apr 16, 2005 (gmt 0)

This is how you would do it using a table:

<html>
<head>
<title>At vero eos et accusamus</title>
</head>

<body>

<p>At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. emporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat. </p>

<p>
<table align="right" border="0" cellspacing="0" cellpadding="1">
<tr>
<td>
<!-- Insert Google Ad Code Here -->
</td>
</tr>
</table></p>

<p>At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non ecusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat. </p>

</body>
</html>

sircraig2000

5+ Year Member



 
Msg#: 6184 posted 4:29 pm on Apr 27, 2005 (gmt 0)

I am using the above table but the text wraps around the adsense too closely (they kind of run together).

How would I put in a blank space between where the adsense meets the text using the table example above?

hyperkik

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 6184 posted 4:39 pm on Apr 27, 2005 (gmt 0)

Increase the number for "cellpadding" to the desired number of pixels.

sircraig2000

5+ Year Member



 
Msg#: 6184 posted 4:52 pm on Apr 27, 2005 (gmt 0)

hyperkik

Thank you very much for replying. That was exactly what I needed!

wiseapple

5+ Year Member



 
Msg#: 6184 posted 1:18 pm on May 6, 2005 (gmt 0)

Is there any problem with browser compatibility when using the div method to wrap the text around the ads? Just curious. I read somewhere that Netscape still have problems with the div tag.

Thanks.

Eric Giguere

5+ Year Member



 
Msg#: 6184 posted 1:44 pm on May 6, 2005 (gmt 0)

It depends on which version of the browser you're talking about. However, at this point all the recent versions of major browsers support CSS well enough that I think it makes sense to use CSS. You can even make an informed decision about using CSS or not by capturing the User-Agent HTTP header that most of the browser will send you and seeing what versions of various browsers people are generally using to access your site. Do a Google search on "browser masquerading" for more info about user agent stuff.\

Eric

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Google / Google AdSense
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