Ad Templates

  • Thread starter Thread starter Deleted member 745
  • Start date Start date
You can style your ads like I've done, along with adding conditionals. Styling will also give you more control in positioning the ads by using padding, float and margin.
Code:
<xen:if is="{$visitor.message_count} < 100">
<div class="ads_header">
ADSENSE CODE
</div>
</xen:if>

Then just add a new CSS Class in EXTRA.css

Code:
.ads_header
{
YOUR CSS STYLING
}

You might also use the: <xen:else />

That would allow you to maybe show picture (click) affiliated ads to members, rather than showing them google Adsense banners.

Code:
<xen:if is="{$visitor.message_count} < 100">
<div class="ads_header">
ADSENSE CODE GUESTS
</div>
<xen:else />
<div class="ads_header">
ADSENSE CODE MEMBERS
</div>
</xen:if>
 
You can style your ads like I've done, along with adding conditionals. Styling will also give you more control in positioning the ads by using padding, float and margin.

how did you get to put your banner into the header ?
I have tried this with the ad_header template, but something went wrong with the styling so it corrupted my header and website design.

Would you mind sharing the CSS or float and margin tricks to get the banner nicely positioned into the header as you have on your website?

BTW: I have fixed with and fluid-width for the page, but that should not make a difference?

Many thanks!
 
In the ads_header template put this:

Code:
<div class="ads_header">
468x60 ADSENSE BANNER
</div>

IN EXTRA.css put this:

Code:
.ads_header
{
    float: right;
    width: 468px;
    height: 60px;
    background: #032A46;
    border: 1px solid #65A5D1;
    margin-top: 6px;
    margin-right: 132px;
    padding: 4px;
}

But keep in mind that I have changed my "Header Logo" image height from 50px to 82px height. You would have to do the same also to use that code above. Otherwise the banner is too tall at 60px. With the default logo height only being 50px. The banner has to be smaller in height than the Logo image, otherwise you'll have problems.

logo-height.webp
 
thanks a lot, now I know it was the logo.height which caused the issue.
too bad the width of my logo is too big, so this would not work on my page when I have the fixed-width, as the banner will not fit into it :cry:
 
That's the problem with Fluid width, when you shrink the page in size the banner makes the logo step down below it. Really you need a fixed width layout I'd say to avoid that happening. Fluid styles in general are not the best if you intent using banners.
 
Top Bottom