Can't get AdSense Banner to Center Correctly (4 posts)

  1. midlife mama
    Posted 3 years ago #

    Been working on adding an AdSense banner to my Child Theme (Twenty Twelve). Want to add an adsense banner above my header. Added this code to my header.php file:

    <div class="header-adsense">
    My Adsense Code

    And then I added this code to my style.css file:

    .header-adsense {
    	width: 100%; text-align: center; margin-top: 10px; margin-bottom: -35px;

    It looks beautiful on my local site (I even checked in three different browsers) but when I upload to my live site, this is what I get. Upper left-hand corner of my site.

    Can anyone help? Much appreciated.

  2. Michael
    Forum Moderator
    Posted 3 years ago #

    I see the adsense centered in an old IE7 and FF17;

    possibly try to clear the browser cache or reload the web site a few times or press 'ctrl f5' ...

  3. midlife mama
    Posted 3 years ago #

    Such a simple solution and it worked!! Thank you. Now I know for the future.

    Posted 2 years ago #

    wow i was looking how to do this for a while and it worked

Topic Closed

This topic has been closed to new replies.

About this Topic