WordPress.org

Support

Support » Themes and Templates » [Resolved] How do I center the Banner Ad above my header?

[Resolved] How do I center the Banner Ad above my header?

  • When I manually add the banners html above my header code it shows up all the way to the left on my homepage. I want the banner centered above my blog title so it looks more professional.

    Right now I am using about 100 periods to center the banner and it looks horrible, what can I do?

    Here is my blog: http://chiefsinformer.com/

Viewing 8 replies - 1 through 8 (of 8 total)
  • esmi

    @esmi

    Forum Moderator

    Place the banner inside <div></div> tags with a unique class applied to them, then style that class using your theme’s stylesheet.Eg:

    <div class="banner-ad">
    [ banner code ]
    </div>
    .banner ad {
    width:468px;
    margin:0 auto;
    }

    I’m not sure how to do it. Here is my style sheet:

    .aligncenter {
    display:block;
    margin:auto;
    }

    .alignleft {
    float:left;
    }

    .alignright {
    float:right;
    }

    __________________________________________

    Also, how do I apply a “unique class”

    Please help somebody!

    You could just surround you’re html banner code with
    <center>whatever your html is goes here</center>
    It should work until you find a better way.

    I just thought I should add that esmi stated the proper way to do this. My way should only be temporary until you can fully understand what esmi is talking about.

    holy crap. Thank you so much!

    I just wanted to remind you to close your tags. I checked your site and it looks like you forgot to. <center></center> Don’t forget the slash.

    Yeah, I liked it better with everything centered

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Resolved] How do I center the Banner Ad above my header?’ is closed to new replies.