Forums

[resolved] Trouble center footer (8 posts)

  1. smithc1080
    Member
    Posted 6 months ago #

    SO here is the code for my footer from the footer.php file.

    <?php
    /**
     * @package WordPress
     * @subpackage Adventure_Journal
     */
    ?>
    			<!-- begin footer -->
    			<div class="clear"></div>
                <div id="footer">
    				<div class="nav-horz nav-footer"><?php  wp_nav_menu( array( 'theme_location' => 'footer-menu' ) ); ?></div>
    				<?php wp_footer(); ?>
    				<div class="clear"></div>
                </div>
              </div>
            </div>
    		<div id="colophon">
    			<a id="wpophon" href="http://www.wordpress.org" title="Powered by WordPress"></a>
    			<div class="clear"></div>
    		</div>
        </div>
    </body>
    </html>

    Can't seem to get this centered on my page. Have tried nearly all centering code I can think of with no results. Pretty new to this so probably just doing something stupid. I am running the newest version of wordpress with an adventure theme. I have a guy that helps with this kind of stuff but he is in Europe for a month so I need to reach out to the WP peeps. Any help would be appreciated!

  2. SwansonPhotos
    Member
    Posted 6 months ago #

    Try wrapping the menu and items in a table, centered, instead of a div.

  3. timDesain
    Member
    Posted 6 months ago #

    what is your website?

  4. smithc1080
    Member
    Posted 6 months ago #

    That was a no-go. Didn't work for me and made the things that were already there look weird. Thanks for the suggustion though.

  5. rachelbaker
    Member
    Posted 6 months ago #

    Providing a link to the site is really the best way for us to help.

  6. smithc1080
    Member
    Posted 6 months ago #

    Sorry. Thought I had that in the original post. It's http://www.cjmarketingagency.com... Like I said my partner that does all the wordpress work is out of the country for a month and this has been bugging me. Just want to center than "powered by wordpress" logo. Thanks!

  7. timDesain
    Member
    Posted 6 months ago #

    open your theme's style.css

    remove float: left;
    from

    .nav-horz li {
    }

    then, add this style

    #footer{
    text-align: center;
    }
    #footer ul{
    margin:0;
    padding: 0;
    list-style: none;
    }
    #footer ul .children{
    display: none;
    }
    #footer li{
    margin:0;
    padding: 0;
    width: auto;
    display: inline-block;
    }

    wp logo
    remove float: right;
    from

    #wpophon {
    }

    and add
    margin: 0 auto;
    to

    #wpophon {
    }
  8. smithc1080
    Member
    Posted 6 months ago #

    Thatnks... All I needed was the bottom part. Just changed #wpophon { display:block; width:228px; float:right; height:44px; background:url to #wpophon { display:block; width:228px; margin: 0 auto; height:44px; background:url So basicaly your last step! Thanks!

Reply

You must log in to post.

About this Topic

Tags