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

XF 1.5 ad_header alignment issue

Discussion in 'Styling and Customization Questions' started by Huskermax, May 20, 2016.

  1. Huskermax

    Huskermax Member

    Code:
    <xen:hook name="ad_header" />
    
    
    <!-- HM Forum 728 ATF [async] -->
    <div style="display: block; float: right; line-height: {xen:calc '@headerLogoHeight - 4'}px; *line-height: @headerLogoHeight; height: @headerLogoHeight; vertical-align: right">
    <script type="text/javascript">if (!window.AdButler){(function(){var s = document.createElement("script"); s.async = true; s.type = "text/javascript";s.src = 'http://ab166223.adbutler-exciton.com/app.js';var n = document.getElementsByTagName("script")[0]; n.parentNode.insertBefore(s, n);}());}</script>
    <script type="text/javascript">
    var AdButler = AdButler || {}; AdButler.ads = AdButler.ads || [];
    var abkw = window.abkw || '';
    var plc177464 = window.plc177464 || 0;
    document.write('<div id="placement_177464_'+plc177464+'"></div>');
    AdButler.ads.push({handler: function(opt){ AdButler.register(166223, 177464, [728,90], 'placement_177464_'+opt.place, opt); }, opt: { place: plc177464++, keywords: abkw, domain: 'ab166223.adbutler-exciton.com' }});
    </script>
    </div>
    
    This is what I have in the ad_header template.

    When I view the board I see that the ad is all the way to the right. I would like it just left of the logo which is on the far left. Each time I try different div align left or middle it just messes it up, it either puts the logo in the middle or puts the ad above the logo.
     

    Attached Files:

  2. SneakyDave

    SneakyDave Well-Known Member

    did you try changing float: right to float:left?

    Go Huskers. Good to (hopefully) see you move off vBulletin.

    Edit: I was taking a look at the site. It appears to me, you should put your logo and ad in a div for themselves, the logo floated left, the ad floated right. It looks like they are separate divs.

    Code:
    <div style="width: 100%;">
      <div style="float: left;">logo.gif</div>
      <div style="float: right;">ad code goes here</div>
      <div style="clear: both;">
    </div>
    
     
    Last edited: May 20, 2016
  3. Huskermax

    Huskermax Member

    Yes I tried, right is the only way it looks normal. I will try putting the logo in a div.

    These ads do screw up the margin when viewing on a Mobile.

    Do you know of away to fix that?
     
  4. SneakyDave

    SneakyDave Well-Known Member

    I've only ever seen Google Adsense work we on mobile with responsive styles
     
  5. Huskermax

    Huskermax Member

  6. SneakyDave

    SneakyDave Well-Known Member

  7. Huskermax

    Huskermax Member

    Do I need to find the logo in the header template to put it in a div?

    Looking at the header temp I have several tabs to choose from. header, header.css, logo_block so on and so fourth. So not really sure which one I need to be in to put a float left div around the logo. All three seem to have logo code in them.

    Anyhow do you use the Huskermax bbs? We are switching, the test board is below.

    http://forum.huskermax.com/vbbst/index.php
     
    SneakyDave likes this.

Share This Page