1. 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

Discussion in 'Styling and Customization Questions' started by ProCom, Nov 5, 2013.

  1. ProCom

    ProCom Active Member

    This map / location of ad placements is BRILLIANT:

    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?

    ... but my real question is this: How do I get an ad placement to the far right of the logo (right justified) like this:

    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!
    jauburn likes this.
  2. Blue

    Blue Well-Known Member

    <div align="right">
    Ad  code here
  3. ProCom

    ProCom Active Member

    Sorry, I'm a newb... where exactly would that code go so that it doesn't impact anything else?
  4. Blue

    Blue Well-Known Member

  5. ProCom

    ProCom Active Member

    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)

  6. EQnoble

    EQnoble Well-Known Member

    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.
  7. Blue

    Blue Well-Known Member

    I'm not really good at this but you would need to set the height something like this.

    <div align="right" width="180" height="180"/>
    Ad code here
  8. ProCom

    ProCom Active Member

    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?
  9. MagnusB

    MagnusB Well-Known Member

    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 likes this.
  10. Steve F

    Steve F Well-Known Member

    <div style="float: right;"> Ad Here </div>

    Probably will need some margin-top or something.
    ProCom likes this.
  11. ProCom

    ProCom Active Member

    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!!
  12. Brogan

    Brogan XenForo Moderator Staff Member

  13. jauburn

    jauburn Well-Known Member

    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:
    <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

    Where would you?
  14. Brogan

    Brogan XenForo Moderator Staff Member

    The ad_header template.
  15. Verringer

    Verringer Active Member

    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.
  16. Brogan

    Brogan XenForo Moderator Staff Member

    That is part of the Flexile style.
    If you search in the resource discussion thread, you should find the answer.

Share This Page