• stomponstep1

    (@stomponstep1)


    Hello,

    I am trying to insert an adsense ad above the page title, but below the navigation bar on all of my pages. I was unimpressed with multiple plugins so I am trying to code it in manually even though I have limited coding experience. After watching some youtube videos and searching this forum I was able to get the add in the correct location, but I am having trouble centering it. I am currently using <center> “adense code” </center> in header.php, but it comes out about 200 pixels too far to the left. It looks like it would be in the perfect centered location if I had a side bar on the right side, but I don’t (I only have one on the left). I have also tried using <div id=”googleAd”> “Adsense code” </div> in header.php with #googleAd { text-align: center; } at the bottom of style.css but the same thing happened.

    My website is StompOnStep1.com. I am using the Twenty Fourteen Theme with a child theme as well as the plugins “Fourteen Colors” and “Fourteen Extended.” The add is shown on every page except the home page. I am using the latest version of wordpress and all of my themes & plugins.

    Any help is much appreciated.
    Thanks!
    -Brian

Viewing 1 replies (of 1 total)
  • Thread Starter stomponstep1

    (@stomponstep1)

    Actually now that I am looking at it, the add perfectly centered in the page. However, it looks very off center based on the left side bar. It ends up almost touching the side bar on the left while being very far from the right side of the page. It is also not centered with regard to the content/page text. So how to I center it in relationship to just the content area (the white area with text) rather than centering it to the entire web page (which includes the left side bar in orange)?

Viewing 1 replies (of 1 total)
  • The topic ‘Problems Centering Item’ is closed to new replies.