• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 Ad placement to right of logo

ProCom

Active member
#1
This map / location of ad placements is BRILLIANT:
http://xenforo.com/community/resources/visual-list-of-ad-locations.1383/

A few issues:

1) In one pic it shows the header ad location and some arrows. I had this same thing happen. What's up with that?
upload_2013-11-4_17-44-45.png


... but my real question is this: How do I get an ad placement to the far right of the logo (right justified) like this:
upload_2013-11-4_17-47-15.png


It just seems that there is a LOT of blank space wasted in that header location and I'd like to put an ad there.

Since my theme is responsive, I could just use conditionals to not show the ad when screen width is below xyz pixels.

Thanks in advance for your ideas!
 

ProCom

Active member
#5
Thanks for the reply, but I run into two problems:

1) The banner ad is placed above the logo to the right vs. directly to the right of the logo
2) Those weird right pointing arrows are still showing up to the left of the page on the logo (same as the first thumbnail screenshot I posted above)

upload_2013-11-4_19-24-55.png
 

EQnoble

Well-known member
#6
those appear to be the breadcrumb crumbs which appear to be in the same place they were before except that your header is pushed down covering the breadcrumbs leaving only the arrows exposed.
 

Blue

Well-known member
#7
I'm not really good at this but you would need to set the height something like this.

Code:
<div align="right" width="180" height="180"/>
Ad code here
</div>
 

ProCom

Active member
#8
It's odd to me that the default skin and ad location for ad_header causes that to happen. Wouldn't that be considered a bug?
 

MagnusB

Well-known member
#9
It is not a bug, it is a styling issue. One of two is happening:
1. Your logo + ad is too wide for a single line in the header, so they are placed on two lines.
2. You are missing a clearfix or similar.

You need to use an element inspector to figure out what is happening.
The header area is a fixed height, if you want it higher you need to specify this, as xF will move it to the top with CSS, while the html is at the bottom.
 

ProCom

Active member
#11
Damn you guys are smart!

First I applied @Steve F 's recommended div and that put the image on the same "line" as the logo.
Next I followed @MagnusB 's suggestions and went to Appearance Styles > Default Style > Style Property Groups >> Style Properties: Header and Navigation and set "Height of Header Logo" to 75 px and BAM, the arrows are gone!

Brilliant work guys!!
 

jauburn

Well-known member
#13
The last entry in this post in the FAQ explains how to center it vertically on the right: http://xenforo.com/community/threads/frequently-asked-questions.5183/#post-181037
In that post, you don't say where to place this code, exactly:

How do I place an image or advert in the header on the right and center it vertically?Wrap the contents in a div like so:
Code:
<div style="display: block; float: right; line-height: {xen:calc '@headerLogoHeight - 4'}px; *line-height: @headerLogoHeight; height: @headerLogoHeight; vertical-align: middle">
Image or advert code
</div>


Where would you?
 

Verringer

Active member
#15
I was just looking for this exact thing.

How would I have this like 8wayrun?


I know that the 'Flexile' skin uses this aswell, it'd be a huge help if someone could tell me the code they'd use to get this.
Thanks.
 

Brogan

XenForo moderator
Staff member
#16
That is part of the Flexile style.
If you search in the resource discussion thread, you should find the answer.