• i want to keep a banner in header,i reffered this forum but discussion didn’t really helped me.I kept the banner in header.php and also pasted this

    .ads-header-desktop {
        display: block;
        float: right;
        margin-right: 5px;
        margin-top: -95px;

    }
    in custom.css and whatever banner in header.php right below this
    <?php if ( has_nav_menu(‘header’) ): ?>
    as some body already had this problem and they got solved i think so,because they closed that thread.
    whenever i replaced the code changing position in various places it got placed some times below the menubar or sometimes upside of whole website.But not in middle of two menus in right side.
    as shown in this image here
    please give me instructions step by step if anybody are familiar and got solved this problem.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi grayhat123. Can you post a link to your site so we can take a look at the issue? Thanks.

    Thread Starter grayhat123

    (@grayhat123)

    hello sir,nice to hear from you again..i first of all thank you for reply..

    I have kept this banner in header.php just below this

    <?php endif; ?>
    <div class="ads-header-desktop"><a href="https://www.viglink.com/?vgref=1663318&vgtag=banner">
      <img alt="VigLink banner" height="90" src="//publishers.viglink.com/images/banners/728x90-1.png" width="728" />
    </a></div>

    Then the result is here

    In the custom.css i have placed this

    /* Global */
    .mystyle {.ads-header-desktop {
        display: block;
        float: right;
        margin-right: 5px;
        margin-top: -95px;
        }}

    These all instructions are given in previous threads but this is not really setting banner in right position .like in this picture

    Thanks for replying..and giving awesome support…I will wait for your reply..

    Try changing your css to this (without the mystyle query/class):

    .ads-header-desktop {
        float: right;
        margin-right: 5px;
        margin-top: -150px;
        }

    As the viewport becomes narrower the add will slide left over the top of the logo until the menus collapse, at which point the logo overlays the ad. If you want the ad to slide under the logo as the viewport changes, use this css:

    .ads-header-desktop {
      float: right;
      margin-right: 5px;
      margin-top: -150px;
      position: relative;
      z-index: 1;
      }
    
    .site-title {
      position: relative;
      z-index: 999;
      }

    Let me know how that works.

    Thread Starter grayhat123

    (@grayhat123)

    you are life saver…made it in a minute ..i was searching for this from 2 weeks…thank u sir…i made it with u…i got exactly what i want

    Glad it worked. If you don’t need any more assistance here please mark the topic as resolved. Thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘how to keep adsense or other banners in header’ is closed to new replies.