View Full Version : How to add ad banner to header?
RedTrinity
09-01-2008, 01:07 PM
Hi guys,
I am just after some advice/support on how to add ad banner code to the header of the new forum template I am currently setting up?
The code I want to add for the rotating banner is the following...
<if condition="!is_member_of($bbuserinfo, 109)">
$GLOBALS[bannerads]
</if>
The template is here: http://www.theparentingsanctuary.com.au/forums/?styleid=30
I simply want to have it centered in the middle of the header, between the logo on the left and the member info/login on the right. Have tried doing it myself numerous times tonight but to no avail, seems to be conflicting with the logo image a lot.
Thanks in advance for the help :)
--------------- Added 1220314902 at 1220314902 ---------------
Wow, no help with this one?
mikesz
09-02-2008, 11:55 PM
Probably need to add some CSS code to be able to place the banner on the header.
For example if you were putting a text line in the header you might use something like :
Two different ways to place text on that skin header:
.mytext {
position: absolute; top: 46px; right: 140px;
height: 37px;
padding-right: 25px;
color: #FF0000;
font-size: 16px;
font-weight: bold;
}
.mytext {
position: relative;
top: -70px; left: 330px;
color: #0000FF;
font-size: 16px;
font-weight: bold;
}
In the header template:
Add:
<div class="mytext"> This is the text I want to display in the header!</div>
You should be able to easily adapt something like this for your banner display.
HTH,
mikesz
RedTrinity
09-03-2008, 09:38 AM
Hi Mikesz,
Thanks so much for your help :)
I just tried your 2 suggested code variations and unfortunately I am having the same issue I have been experiencing with my own attempted ones previously - and that is apparent conflict with the logo:
https://vborg.vbsupport.ru/external/2008/09/76.jpg
From there, using one of your 2 suggestions or my own, I can get the ad banner centered on the same line/level it appears above in the screenshot. But just can't seem to get it to appear further up, so its exactly between the logo and member login info :confused:
Any further suggestions or help would really be appreciated!
Cheers,
Nikki.
RedTrinity
09-07-2008, 06:24 AM
No-one can help? :(
Attitude5ire
09-07-2008, 09:36 AM
You dont really need use positioning in ur DIV structure.
I would prolly edit your header template seems a bit clattered.
just divide into 3 divs one for logo one for ads one for Login.
float the login to right, logo to left and your Ad will remain in center.
Another way could be table 3 cells.
iadventure
03-06-2010, 10:25 PM
what would the code look like to accomplish this?
princeedward
03-07-2010, 05:40 AM
go acp > additional.css template and add this:
.ad_global_header {
float:right;
position:absolute;
top:40px;
right:40px;
}
Now place the Ads HTML code in the ad_global_header2 template :
Admin CP -> Styles & Templates -> Style Manager -> Edit Templates -> Ad Location Templates -> ad_global_header2
Note:
Try to adjust the (red) for right and top values as needed for the placement.
hope it help you all...
best regards
:p:up:
danyol1706
11-14-2010, 11:40 PM
go acp > additional.css template and add this:
.ad_global_header {
float:right;
position:absolute;
top:40px;
right:40px;
}
Now place the Ads HTML code in the ad_global_header2 template :
Admin CP -> Styles & Templates -> Style Manager -> Edit Templates -> Ad Location Templates -> ad_global_header2
Note:
Try to adjust the (red) for right and top values as needed for the placement.
hope it help you all...
best regards
:p:up:
I added above code to additional.css in vB 4.0.8, but it just ignores the code completely and I still cannot get the banner to load right under the login info. I used the "Advertising>Add New Add>Global>Header 2" slot for a test 480x60 banner ad (see attached image).
As seen in the image, my banner is stuck in the middle of the header, along the top.
osras1
07-18-2014, 08:47 PM
I am looking to have my logo on the left with 2 vertical rotating banners on the right side(instead of horizontal) example http://www.reef2reef.com is there a special code ?
ozzy47
07-18-2014, 11:32 PM
I am looking to have my logo on the left with 2 vertical rotating banners on the right side(instead of horizontal) example http://www.reef2reef.com is there a special code ?
This thread is over six years old.
Please start your own thread with all relevant information.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.