• Hello there,

    I have added my first google advertisement on my website but I have a little problem: the ad is slightly truncated with the navigation bar. How can I align from top to bottom the ad block? (I’d like to align it with the logo)

    I am currently using an ad block of w=728 h=90 and it’s placed at top part of the website, next to the logo. Here is the link of my website: http://www.nonhotv.com/

    Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • example:

    <div class="header-ad">
    ADCODE HERE
    </div>
    Thread Starter Bliss07

    (@bliss07)

    Unfortunatelly is not working. I still see the ad truncated, moreover I have tried to follow the instructions as reported here but it is not working too.

    However here I write the steps that I have done:

    I have sourrounded the google code with: <div id=”adsenseAd”>…google code…</div> ;

    Then added in the style.css: #adsenseAd { margin-left: bottom; } ;

    It didn’t work and I have tried another possible solution in header.php but it didn’t work too:

    <div style=”text-align: center;”>…google ad code…</div>

    Any idea what it could be?

    I don’t see any truncation;

    to push the ad down, try:

    #adsenseAd { padding-top: 50px; }

    adjust the number value.

    posting a screenshot of your problem might help to illustrate what you are getting in your browser.

    Thread Starter Bliss07

    (@bliss07)

    Hi alchymyth,

    The ad block is not moving at all. I have tried different solutions but it remains as it is now. This is what I’ve done so far is (text in bold is the new code lines added):

    header.php page:

    <div id=”adsenseAd”><script type=”text/javascript”><!–
    google_ad_client = “ca-pub-6085820096448112”;
    /* nonhoTVtop */
    google_ad_slot = “0253151975”;
    google_ad_width = 728;
    google_ad_height = 90;
    //–>
    </script>
    <script type=”text/javascript”
    src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”&gt;
    </script></div>

    After having added <div id=”adsenseAd”> I’ve opened the CSS Stylesheet page and added at the botton of the CSS:

    #adsenseAd {
    padding-top: 50px;
    }

    Regarding the screenshot, I think there is no need to uploadit as I just want to push the ad down like you have said.

    Thanks!

    try to clear the browser cache – ‘CTRL F5’ or ‘reload’ or whatever your browser needs…

    I can’t find the #adsenseAd css in your site.

    Thread Starter Bliss07

    (@bliss07)

    Hi alchymyth,

    I have tried to clear the browser cache but there are no changes.

    Regarding #adsenseAd I have added it in Stylesheet (style.css) at the bottom of my theme’s stylesheet (style.css). This is where I have added the value:

    [CSS code moderated – a link to your site is enough to access the styles]

    This is the very end of my stylesheet, I have also notice that there is another page called Style-black.css (style-black.css), perhaps I should make some changes there?

    Moreover I have copied the google ad code in the header page (header.php) just below the following code string:

    [code moderated – the forum limit is 10 lines – please follow the forum guidelines for posting code]

    Did I do something wrong?

    Thanks!

    that section at the end is only called for smaller screens;

    add the css somewhere close to the top of style.css

    Thread Starter Bliss07

    (@bliss07)

    Hi alchymyth,

    My mistake was adding the value at the end of my stylesheet as you have pointed out. Moving the CSS value from the bottom to the top (headings section) it worked!

    Thanks a million!

    Thread Starter Bliss07

    (@bliss07)

    Issue fixed.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘How do I wrap my ad code in a div class or id?’ is closed to new replies.