WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. midlife mama
    Member
    Posted 1 year 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
    	</div>

    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. alchymyth
    The Sweeper & Moderator
    Posted 1 year 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
    Member
    Posted 1 year ago #

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

  4. DR_MCGILL
    Member
    Posted 3 months 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