editortnm
Member
Posted 3 years ago #
<?php get_header(); ?>
<a href="http://www.url.net"><img src="http://www.url.net/images/468x60-2.gif" border="0" /></a>
<div id="content" class="narrowcolumn">
<?php if (have_posts()) : ?>
I have added the second and third lines of code:
<img src="http://www.url.net/images/468x60-2.gif" border="0" />
and tried everything to centre it underneath the header image but it just stays flush left against the blog's page template. None of the html aligns seem to work, and I have even tried a few css ids and classes (not that I understand those too much) but nothing changes.
I am glad it is showing up at last - why do WP changes take so long to show up any???
I'd be most grateful if someone could point me in the right direction - Something that was supposed to take a minute has taken me over 2 days :(
Thx.
We'd actually need to see the site itself. A snippet is not enough to help out.
lionking06
Member
Posted 3 years ago #
Change from <img src="http://www.url.net/images/468x60-2.gif" border="0" />
to
Solution 1:
<div align="center><img src="http://www.url.net/images/468x60-2.gif" border="0" /></div>
If you dont want too much GAP, above below the image. Control the gap by using solution 2
Solution 2:
<div class="myimage"><img src="http://www.url.net/images/468x60-2.gif" border="0" /></div>
And add this to CSS:
.myimage
{
text-align: center;
padding: 0px;
margin: 0px;
}
editortnm
Member
Posted 3 years ago #
Thanks. Alas, neither of those methods work. The file is the default theme index.php and single.php file (I am told it needs to go into both of those).
The banner remains seemingly aligned left (as text is in a blog) and not centered under the banner.
Try
.myimage
{
width:468px; // the width of your banner
padding: 0px;
margin: 0 auto 0 auto;
}
lionking06
Member
Posted 3 years ago #
Add these to css class
body and content or main or wrap whatever class/id is next after body tag
margin: 0 auto;