• <?php get_header(); ?>
    <a href="https://www.url.net"><img src="https://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=”https://www.url.net/images/468×60-2.gif&#8221; 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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    We’d actually need to see the site itself. A snippet is not enough to help out.

    Change from <img src=”https://www.url.net/images/468×60-2.gif&#8221; border=”0″ />

    to

    Solution 1:
    <div align="center><img src="https://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="https://www.url.net/images/468x60-2.gif" border="0" /></div>

    And add this to CSS:
    .myimage
    {
    text-align: center;
    padding: 0px;
    margin: 0px;
    }

    Thread Starter editortnm

    (@editortnm)

    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;
    }

    Add these to css class

    body and content or main or wrap whatever class/id is next after body tag

    margin: 0 auto;

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to centre image – been trying for 2.5 days :(’ is closed to new replies.