seneditor61
Member
Posted 5 months ago #
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?
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.
seneditor61
Member
Posted 5 months ago #
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?
seneditor61
Member
Posted 5 months ago #
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!