You are here: Home > Forum > Site Design & Construction > adsense and text Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Mike



Joined: 29 Dec 2005
Posts: 120
Location: Ontario, Canada

PostPosted: Tue May 30, 2006 8:13 pm    Post subject: adsense and text Reply with quote

How do you put text right next to a rectangle adsense ad. I cannot figure it out.
Back to top
Will



Joined: 26 Feb 2006
Posts: 148
Location: UK

PostPosted: Tue May 30, 2006 10:23 pm    Post subject: Reply with quote

You could either use a table or CSS methods.

Table
Code:
<table width='100%' cellspacing='0' cellpadding='10' border='0'>
  <tr>
    <td>
      AdSense code
    </td>
    <td>
      Text
    </td>
  </tr>
</table>


CSS
Code:
<span style='float: left; margin: 0 10px 10px 0;'>AdSense code</span>
Text
Back to top
boysbach



Joined: 27 Dec 2005
Posts: 195

PostPosted: Wed May 31, 2006 12:38 am    Post subject: Reply with quote

Mike it is one of the features in Xsitepro you can select adsense to go left, in the normal flow or to the right. Apart from that I have no idea but Will is great at giving these hints. Very Happy
Back to top
Will



Joined: 26 Feb 2006
Posts: 148
Location: UK

PostPosted: Wed May 31, 2006 6:55 pm    Post subject: Reply with quote

The CSS method is the best because you don't get the extra code bloating your page up and you can easily get the text wrapping around the ad. With tables, you'd have to split the text up and place it into the row beneath.

Table method example

CSS method example

View the page source to see what's going on.

By the way, those ads aren't live ads; the publisher ID is 'ca-test' which means that no money exchanges hands if they're clicked on.

A very handy tip if you're checking your own AdSense pages and are a bit trigger happy on the mouse button Very Happy
Back to top
Mike



Joined: 29 Dec 2005
Posts: 120
Location: Ontario, Canada

PostPosted: Wed May 31, 2006 6:59 pm    Post subject: Reply with quote

Will,

Thanks for the tips. CSS seems the way to go. Tables would be too much of a hassle, takes up too much time, and too much code.

Mike
Back to top
Will



Joined: 26 Feb 2006
Posts: 148
Location: UK

PostPosted: Wed May 31, 2006 7:50 pm    Post subject: Reply with quote

You're welcome. Even better, would be to move the CSS into an external stylesheet as that would then be cached locally by the visitor's web browser and make your pages even leaner.

CSS example with external style sheet

The style sheet used in the page above
Back to top
Rosalind Gardner
Site Admin


Joined: 02 Nov 2005
Posts: 803
Location: Beautiful BC, Canada

PostPosted: Sat Jun 03, 2006 2:20 am    Post subject: Reply with quote

Hey Will,

I was wondering how to do that with CSS as well.

Thanks for sharing.

Cheers,
Ros
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetProfitsToday.com Forum Index -> Site Design & Construction All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum