• Need code help! I want the banner ad on my site to be placed just above the post content and under the menu bar in the header. I put this code into header:
    <?php show_banner(); ?>
    and banner shows up justified upper left. Can I add code to this line to align the banner?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Add to your stylesheet:

    .newstyle {
    margin-left: auto;
    margin-right: auto;
    /* more CSS if desired - remove this line */
    }

    Then mod to:

    <div class="newstyle"><?php show_banner(); ?></div>

    …or wrap in an element of your choice.

    (‘newstyle’ can be any name that is not used already or the defaults)

    You may need to add a ‘clear:both’ to the style or inline.

    Thread Starter seneditor61

    (@seneditor61)

    Thanks!
    I added:

    .newstyle {
    margin-left: auto;
    margin-right: auto;
    clear: both;
    }

    and
    <div class="newstyle"><?php show_banner(); ?></div>
    but it is still justified left.
    How do I code for centering above post title?

    Can you provide a site link specific to the question and which image is it exactly?

    Thread Starter seneditor61

    (@seneditor61)

    I just added padding to the style.css like this:

    padding-top:30px;
    padding-left:80px;

    and it worked fine. Thanks so much for your help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to center banner under under header and above content’ is closed to new replies.