Support » Fixing WordPress » Footer won't align to center

  • Resolved practical


    Hello all,

    i’ve tried many times with the css to align my footer center but can’t seem to,

    here’s the footer.php

    <div id="footer">© all content copyright
    <?php wp_footer(); ?> 

    and the css for it

    #footer {
            position: relative;
    margin-top: -150px;
    height: 150px;

    website is here

    Any help would be much appreciated, I’m at a brickwall!

Viewing 15 replies - 1 through 15 (of 18 total)
  • Moderator Andrew Nevins


    Forum moderator

    What CSS have you tried to centre it?

    ive tried using

    margin: auto;

    but to no avail…

    Moderator Andrew Nevins


    Forum moderator


    thanks 🙂

    I’ve tried some of these and still doesn’t want to center, i’m not sure if a /div isn’t closed or something else isn’t being read somewhere as the footer isn’t picking up the css commands.

    Moderator Andrew Nevins


    Forum moderator

    Where are you adding the CSS?

    to the #footer in the stylesheet

    Moderator Andrew Nevins


    Forum moderator

    Which stylesheet?

    the one for the website


    Try this:

    <div id=”footer”>
    <p> copy; all content copyright</p>

    #footer {
    margin:0 auto;

    #footer p {

    (Sorry for no back ticks to format the code … I’m on my iPad and it doesn’t have back ticks available for me to use.)

    thanks for your help too, but still doesn’t work.
    not sure what it could..

    Wow. Just looked at your source code. Think you need to run your site through a validator. It appears you’ve got at least be extra closing div tag somewhere you shouldn’t. CSS issues are a LOT easier to diagnose when you fix errors in the site first.

    Moderator Andrew Nevins


    Forum moderator

    Try this, try adding a 10 pixel, red border to your footer in the style.css file.

    Hi @doodlebee

    i have one error which is a </div> on line 95, but i cant seem to find it within wordpress. Do you know where it may be?

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
    <html xmlns="">
    <head profile="">
    <title>Primary Colours Records</title>
    <meta name="description" content="Primary Colours Records is an avant garde record label based in London. all content copyright primary colours records © 2012" />
    <script type="text/javascript">
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-36955597-1']);
    (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="generator" content="WordPress 3.4.2" /> <!-- leave this for stats please -->
    <link rel="stylesheet" href="" type="text/css" media="screen" />
    <link rel="pingback" href="" />
    <link rel='archives' title='December 2012' href='' />
    <link rel="alternate" type="application/rss+xml" title="Primary Colours Records &raquo; Home Comments Feed" href="" />
    <link rel="EditURI" type="application/rsd+xml" title="RSD" href="" />
    <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="" />
    <link rel='next' title='News' href='' />
    <meta name="generator" content="WordPress 3.4.2" />
    <!-- All in One SEO Pack by Michael Torbert of Semper Fi Web Design[211,335] -->
    <meta name="description" content="Primary Colours is an avant garde record label based in London. It was founded by Kit Grill in 2012. all content copyright primary colours records © 2012" />
    <meta name="keywords" content="primary colours, primary colours records, primary colours record label, primary colours avant garde music, electronic music labels london, primary colours label, primary colours uk," />
    <link rel="canonical" href="" />
    <!-- /all in one seo pack -->
    <div id="header">
    <a href=""><img src="" alt="Primary Colours" width="180" height="114"/></a>
    <a href="/info">Information</a><br/><br/>
    <!--<ul id="navlist"><li><a href="">All</a></li><li>No categories</li><a href="">Information</a></ul>-->
    <div id="container">
    <div class="post1">
    <!--<h3>November 2012</h3>-->
    <p><img src="" alt="kit grill, expressions, primary colours records" title="kit grill, expressions, primary colours records" width="450" height="450" class="size-full wp-image-262" /></p>
    <p>Hi and welcome to Primary Colours Records. Sign up to our newsletter below to be the first to hear about the debut Ep coming out in February 2013. </p>
    <p><script type="text/javascript" src=""></script><br/><br/></p>
    <div id="footer">
    <p> copy; all content copyright</p>

    found it, thanks for all your help 🙂

    i thought it did, but it says error is w3 validator.

    Without the closing div in the header the footer responds to the header css, but when i put a closing div in the header it doesnt respond to the footer css, strange…

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Footer won't align to center’ is closed to new replies.