• joeytech

    (@joeytech)


    I can’t seem to get the footer to go down on the bottom.
    Here is what happens:
    http://tinypic.com/view.php?pic=33vlxck&s=5
    Here is my Index, Css, And Footer

    <?php get_header(); ?>
    <div id="container">
    	<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
    	<div class="post">
    		<h2><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"></a></h2>
    	<div class="entry">
    		<?php the_content(); ?>
    		<p class="postmetadata">
    <?php _e('Filed under:'); ?> <?php the_category(', ') ?> <?php _e('by'); ?> <?php  the_author(); ?><br />
    <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?> <?php edit_post_link('Edit', ' | ', ''); ?>
    				</p>
    	</div>
    	</div>
    	<?php endwhile; ?>
    		<div class="navigation">
    			<?php posts_nav_link(); ?>
    		</div>
    	<?php else : ?>
    		<div class="post" id="post-<?php the_ID(); ?>">
    			<h2><?php _e('Not Found'); ?></h2>
    			</div>
    	<?php endif; ?>
    </div>
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    body, h1, h2, h3, h4, h5, h6, blockquote, p {
    margin : 0;
    padding : 0;
    }
    body {
    margin : 0;
    font-family : Arial, Helvetica, Georgia, Sans-serif;
    font-size : 12px;
    text-align : center;
    vertical-align : top;
    background : #ffffff;
    color : #000000;
    }
    h1 {
    font-family : Georgia, Sans-serif;
    font-size : 24px;
    }
    a:link, a:visited {
    text-decoration : underline;
    color : #336699;
    }
    a:hover {
    text-decoration : none;
    }
    p {
    padding : 10px 0 0 0;
    }
    #container {
    float : left;
    width : 500px;
    }
    .post {
    padding : 10px 0 10px 0;
    }
    .post h2 {
    font-family : Georgia, Sans-serif;
    font-size : 18px;
    }
    .entry {
    line-height : 18px;
    }
    p.postmetadate {
    border-top : 1px solid #ccc;
    margin : 10px 0 0 0;
    }
    .navigation {
    font-size : 14px;
    font-weight : bold;
    line-height : 18px;
    }
    .sidebar {
    float : right;
    width : 200px;
    background : #eeeeee;
    margin : 0 0 0 10px;
    display : inline;
    }
    .sidebar ul {
    list-style-type : none;
    margin : 0;
    padding : 0 10px 0 10px;
    }
    .sidebar ul li {
    padding : 10px 0 10px 0;
    }
    .sidebar ul li h2 {
    font-family : Georgia, Sans-serif;
    font-size : 14px;
    }
    .sidebar ul ul li {
    padding : 0;
    }
    table#wp-calendar {
    width : 100%;
    }
    #footer {
    	padding : 10px;
    	margin-top : 2em;
    	width : 100%;
    	text-align : center;
    }
    <div id="footer">
    <p>
    J tech
    </p>
    </div>
    </body>
    </html>

    Thanks

Viewing 1 replies (of 1 total)
  • mccormicky

    (@mccormicky)

    There is usually a minimum of 1 “wrapper” or container kind of div.

    Since your container div is what most people name the “content” div(the wrapper div for post and entry) there is nothing holding the rest of your blocks in place.

    Then you are floating the container div to the left and when ever you float you usually have to clear that float,unless you have enough content in all your pages in text or images for .entry to “push” the footer down…although this will usually still result in a maverick footer floating around where you don’t want it. It’s just easier to contain everything in one big div. That’s why it is called #container.

    I would add div id=”wrapper” right after the body tag in header.php & add clear:both to the footer css. Then close the wrapper div in footer.php right after the closing div tag for #footer.
    in header.php

    <body>
    <div id="wrapper">

    …header stuff like menu and etc.
    Don’t close the wrapper div in header.php.
    Do that in footer.php.
    Optional CSS:
    #wrapper{width:xxx;height:auto;margin:0 auto;/*centers if you want is centered*/}

    #footer {
            clear:both;
    	padding : 10px;
    	margin-top : 2em;
    	width : 100%;
    	text-align : center;
    }

    then:

    <div id="footer">
    
    J tech
    
    </div>
    </div><!--closes the wrapper div -->

    Good luck!

Viewing 1 replies (of 1 total)

The topic ‘Can somebody help me?’ is closed to new replies.