Topic: Adding Google AdSense To Header Quick Solution

N3twork2 wrote:

Hello

Main.tpl

<div id="brd-head" class="gen-content">

    <div id="pub">
Google adsense code
    </div>

Css page

#pub {
    position: absolute;
    top: 40px;
    right: 50px;
    width: 468px;
    height: 70px;
}

pub being ads in french smile
thanks N3twork2

probably will be easier to find for people in this post....

Re: Adding Google AdSense To Header Quick Solution

Thank big_smile

Re: Adding Google AdSense To Header Quick Solution

Thank you ! smile

Re: Adding Google AdSense To Header Quick Solution

That worked, thanks!

However, for the CSS page, I used this:

#google {
    float: right;
    width: 468px;
    height: 70px;
}

It aligns it more nicely.  smile

Re: Adding Google AdSense To Header Quick Solution

I use Announcement for AdSense, it can't be easier. smile

Re: Adding Google AdSense To Header Quick Solution

liveambitions wrote:

That worked, thanks!

However, for the CSS page, I used this:

#google {
    float: right;
    width: 468px;
    height: 70px;
}

It aligns it more nicely.  smile

thanks for this topic. it'll help me to add banner in my forum's (http://forum.banglalibrary.org) header

BENGALI E LIBRARY
http://forum.banglalibrary.org, www.banglalibrary.org
Jyoti Tower, P-313, Nabapally, Salt Lake, Sector-IV, Kolkata-700105
E. M BYPASS, BUS STOP : CHINGRIHATA
PH : 033-23353176, +919831193298, +919836422308

7

Re: Adding Google AdSense To Header Quick Solution

how about an extension?

Re: Adding Google AdSense To Header Quick Solution

Its a nice trick, but since my Css experience isn't too wel I cant manipulate the position very good.
Who could help me with some advises?
www.chatair.nl/forum is mine.

9

Re: Adding Google AdSense To Header Quick Solution

Ken1988 wrote:

Its a nice trick, but since my Css experience isn't too wel I cant manipulate the position very good.
Who could help me with some advises?
www.chatair.nl/forum is mine.


fairly easy:

<div id="content" style="position: relative;">
    <div class="adsense"><!-- adsense code here --></div>
</div>

...now that the structure is in place, and the parent container is set to "relative" you can use absolute positioning to put it wherever you want w/in that container.

/* a few examples of positioning */
#content { position: relative; } /* inline style not necessary in above example */
.adsense { position: absolute; top: 0; right: 0; } /* upper right corner of #content */
.adsense { position: absolute; top: 0; left: 0; } /* upper left corner of #content */
.adsense { position: absolute; bottom: 100px; left: 10px; } /* 100px above the bottom and 10px from the left */

You may need to give the container a width and height (at least width since block-level elements are 100% by default)...

.adsense { width: 120px; height: 220px; } /* set a fixed w/h of the adsense container */

Re: Adding Google AdSense To Header Quick Solution

This repley helped me out a lot...
But its still not 100% functional...
Other screen resolutions, might see the adds through the information on the forum.
Isn't there a way, align the add to the right or perhaps move the forum more to the left, to fill the empty spot there (http://forum.chatair.nl)

Thanks in advance,
Ken.