• Resolved pat7047

    (@pat7047)


    I created a WordPress website for a group project I have.

    Here is the URL: http://www.gamertech.us.

    As you can see the footer is off the right. Does anyone know how I can center it?

    Here is the code for my footer.php:

    <?php
    /**
     * @package WordPress
     * @subpackage AppCloud
     */
    ?>
    		<div class="footer">
    			<ul class="footnav">
    				<?php $pages = get_pages(array('sort_column' => 'menu_order', 'parent' => 0)); ?>
    				<li>Copyright &copy; 2010 <?php bloginfo('name'); ?></li>
    				<?php if (is_array($pages) && count($pages) > 0) : ?>
    				<?php $n_page = count($pages); ?>
    				<?php $i_page = 1; ?>
    				<?php foreach($pages as $page) : ?>
    				<li<?php if($i_page == $n_page) : ?>class="no"<?php endif; ?>><a href="<?php echo get_option('siteurl'); ?>/<?php echo $page->post_name; ?>/"><?php echo $page->post_title; ?></a></li>
    				<?php ++$i_page; ?>
    				<?php endforeach; ?>
    				<?php endif; ?>
    			</ul>
    			<div class="clear"></div>
    		</div><!-- footer -->
    	</div><!-- area -->
    </body>
    </html>
Viewing 2 replies - 1 through 2 (of 2 total)
  • You should get rid off the float:right in .footnav

    .headnav,
    .footnav{
    	float: right;
    	list-style: none;
    	display: block;
    	margin: 0 10px 0 0;
    	font-size: 11px;
    }

    But you should actually handle headnav and footnav separately. Like this:

    .headnav {
    	float: right;
    	list-style: none;
    	display: block;
    	margin: 0 10px 0 0;
    	font-size: 11px;
    }
    
    .footnav {
    	text-align: center;
    	list-style: none;
    	display: block;
    	margin: 0 10px 0 0;
    	font-size: 11px;
    }
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How Can I Center Footer’ is closed to new replies.