ADS

Friday, November 20

Google AdSense Skyscraper Ad Placement Using Tables

For most people, the easiest way to implement Google skyscraper advertisements is to use HTML tables. This page explains how to deploy Google skyscraper advertisements on either the right or left hand side of the page.

It's simple for anyone familiar with HTML. Simply create a table with two columns, one for your content, and the second for the Google skyscraper advertisement. Here's an HTML snippet that demonstrates how to do it.
    <table>
      <tr>
        <td valign="top">
        Page content goes here...
        </td>
        <td valign="top" width="160" align="right">
        Google Skyscraper advertisement HTML goes here...
        </td>
      </tr>
    </table>
I've put together a sample of the Google Skyscraper Ad using HTML Tables method. Feel free to browse it and view the source -- and borrow the source if you please. Note, however, that I use a bogus advertisement on that page, but that shouldn't change the table implementation in any way.
Why all the various attributes on the table cells? Those format the content at the top of the cell, and ensure that the column holding the advertisement doesn't get any wider than necessary.
The valign="top" attribute tells the browser to display both the content and the advertisement at the top of the cell (and therefore at the top of the page.) Without it, it may try to center the content vertically in the cell. It will do this to the cell that is shorter than the other cell.
The width="160" tells the table column holding the skyscraper advertisement to always make itself 160 pixels wide. This is the width of the larger of the two skyscraper options that Google offers. If you choose the thinner, 120 pixel wide advertisements, then change this to width="120".
I used the attribute align="right" to ensure that the advertisement "sticks" to the right hand side of the page, regardless of how the browser is sized.
I also centered the table on the page using the <center> HTML tag, which is a bit of a no-no in these days of style sheets, but I wanted to do this example using only HTML and no CSS. (Heck, pretty much all of this is considered a no-no these days.) The width="90%"attribute on the table tag tells the table to use only 90% of the page width, which leaves a bit of white space on each side of the table.