Centering an Adsense block

  • Debi

    #787

    Love this theme. Thank you!! I just added an Adsense block (wide skyscraper ad size 160 pixels wide by 600 pixels long) in the right side bar using a text widget, but the ad will not center. Is there an easy way to do this? I’ve searched and searched, but cannot find it. Thanks, Debi

    Kim

    #13555

    Well, if You change this:

    .sidebar div.sidebar-wrap {
    background: none repeat scroll 0 0 #FFFFFF;
    border: 1px solid #CCCCCC;
    box-shadow: 0 0 5px #BBBBBB;
    margin-bottom: 16px;
    padding: 10px 12px;
    position: relative;
    width: 200px;
    }

    You chance both sidebar.

    So maybe make Your adsense wider. Your sidebar is 200px wide.

    Kim

    Debi

    #13556

    Unfortunately, Adsense does not allow changing of their pre-set ad sizes/code. We’re stuck with the sizes they offer, and this one is the closet size to my theme’s sidebar size. I actually like the size the way it is, but if I could just center the ad box, I’d be happy with it. There has to be some way to move it over to the right a bit, and I’ve been trying different things, but have not found the right fix yet. Any other thoughts?

    Kim

    #13557

    Sorry, just told You 🙂

    Kim

    Admin

    Syahir Hakim

    #13558

    Add this code either into your child theme’s style.css file, or in the theme’s Custom CSS option:

    .sidebar-wrap .textwidget{
    text-align: center;
    }

    Debi

    #13559

    Thank you so much! That worked perfectly.(You make this look so easy.)

    And thanks again for the theme.

    Debi, http://www.artfulveggie.com

    gordon@sheenlions.org

    #13560

    I’m gonna to say: realy impressed, keep it. Supra shoes

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.