WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Advertising Manager] How to center an ad in a widged (3 posts)

  1. mrweb
    Member
    Posted 5 years ago #

    Hello, I've a question. I've installed Advertising Manager and everything works great. But there is one thing I can't work out. I've an Ad in a widget and it is aligned on the left side. I would like to center it. Can somebody help me. THX

  2. mrweb
    Member
    Posted 5 years ago #

    please, can somebody help me?

  3. hedgehogsbottom
    Member
    Posted 4 years ago #

    I can teach you to fish, but I won't fish for you...

    Load up something like Firefox with the Firebug debugger loaded into it.

    Load your page with your plugin' displaying.

    Open the Firebug debugger, and then use the "Click an element to inspect" tool. Move your mouse over the widget and the page's DOM will be shown in a hierarchy. Look at the hierarchy to find the classes used. You can then modify your theme's CSS file to make your widget center.

    For example, using this method I found my AdSense adverts were being contained in a DIVision called #utility-after-single and the Ad Manager was using a class called Advman_Widget. So I added this to my class file:-

    #utility-after-single .Advman_Widget {
    width: 360px;
    margin:0 auto;
    }

    ... which resulted in my advert centring within the widget.

    Hope this helps you help yourself.

Topic Closed

This topic has been closed to new replies.

About this Topic