WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How do I center the Banner Ad above my header? (9 posts)

  1. spanotek
    Member
    Posted 4 years ago #

    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/

  2. esmi
    Theme Diva & Forum Moderator
    Posted 4 years ago #

    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;
    }
  3. spanotek
    Member
    Posted 4 years ago #

    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"

  4. spanotek
    Member
    Posted 4 years ago #

    Please help somebody!

  5. krom8
    Member
    Posted 4 years ago #

    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.

  6. krom8
    Member
    Posted 4 years ago #

    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.

  7. spanotek
    Member
    Posted 4 years ago #

    holy crap. Thank you so much!

  8. krom8
    Member
    Posted 4 years ago #

    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.

  9. spanotek
    Member
    Posted 4 years ago #

    Yeah, I liked it better with everything centered

Topic Closed

This topic has been closed to new replies.

About this Topic