Support » Fixing WordPress » Footer not showing in correct position

  • Lauren

    (@liliripe)


    I am coding a new theme for my site, but for some reason, the footer keeps showing at the top of my page. Here’s my footer.php code:

    <?php
    /**
     * @package WordPress
     * @subpackage Default_Theme
     */
    ?>
    
    <div id="footer">
    
    Text text text.
    
    </div>
    
    		<?php wp_footer(); ?>
    </body>
    </html>

    And here’s the footer code at the bottom of my index.php file:

    <?php get_footer(); ?>

Viewing 5 replies - 1 through 5 (of 5 total)
  • Lauren

    (@liliripe)

    I’ve tried various CSS and HTML codes to try to make the footer “stick” to the bottom of the page, as opposed to the bottom of my window (which is only halfway down the page once I scroll), but nothing works. I copied the code from the Default theme and it’s still not showing up at the very bottom of the page… any ideas?

    Lauren

    (@liliripe)

    Anyone?

    Lauren

    (@liliripe)

    Update: I’ve found that when I make my content div float: left or float: right, the footer “sticks” to the bottom of the page. Yet when I make my content div position: absolute (which is what I need so I can position it), the footer creeps up. Is there any way around this?? Thanks.

    Lauren

    (@liliripe)

    Solved. I kept the content and navigation divs as float:right and float:left, and used padding to position them instead of position: absolute. The footer now stays at the bottom of the page.

    Thanks for writing your progress up, liliripe.
    I came looking for the answer and as soon as a saw the “float:” approach I knew that was it and had my problem fixed in minutes.
    Cheers (and I hope you get this?)

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Footer not showing in correct position’ is closed to new replies.