• Resolved nuxx

    (@nuxx)


    Hi. In my Main Index Template, i’m trying to place the post.php section within a set of DIV tags so that the posts load within a vertical column.

    The DIV tag:
    #blackcontent{background-color:#000;color:#FFF;position:relative;margin:0 auto;min-height:850px;width:360px;padding:10px 20px 10px 20px}

    creates the black column with a minimum height of 850px. So far the posts are loading in correctly. But once I add more posts, the page naturally becomes longer but the black column is not stretching with the page.

    Here is the code on index.php

    <div id="homewrapper"><?php get_header();?>
    <div id="blackcontent">
    <img src="https://www.djnuxx.com/myspace/demo.jpg">
    <div class="homeannounce"><p>Welcome to djnuxx.com!<br />
    something blah blah</p><br /></div>
    
    <?php if (have_posts()) : ?>
    
    	<?php while (have_posts()) : the_post(); ?>
    
    		<?php require('post.php'); ?>
    
    	<?php endwhile; ?>
    <div class="navigation">
    			<div class="alignleft"><?php posts_nav_link('','','&laquo; Previous Entries') ?></div>
    			<div class="alignright"><?php posts_nav_link('','Next Entries &raquo;','') ?></div>
    	</div>
    
            <?php else : ?>
    
    	<h2 class="center">Not Found</h2>
    
    	<p class="center"><?php _e("Sorry, but you are looking for something that isn't here."); ?></p>
    
    <?php endif; ?></div>
    <?php include(TEMPLATEPATH."/l_sidebar.php");?>
    <?php include(TEMPLATEPATH."/r_sidebar.php");?></div>
    <?php get_footer(); ?>

    The page can be viewed at https://www.djnuxx.com/blawg/

    the code which calls to display posts is between the ‘blackcontent’ DIV tags and should follow the rules. The comments page also stretches out to the point where you can’t even see the submit button.

    please help! So confused.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Try min-height:100%; – if the text is shorter than the page 100% will be the height of the screen, if the text is longer then it will push the black bar down.

    850px might be the right size for your browser – but it’s too small for mine and probably too big for somebody else’s, hence 100%

    Thread Starter nuxx

    (@nuxx)

    Yeah, I tried that before and it doesn’t work. It’s as if the post content is not inside the ‘blackcontent’ DIV tags, therefore it’s not stretching out.

    this makes no sense.

    Thread Starter nuxx

    (@nuxx)

    I should add that the same code in the same order and format are working properly on post.php pages. The content stretches out. It’s the single.php and index.php pages that are not following the rules.

    If you take out min-height altogether, what happens?

    You’ve marked the topic resolved: what was the fix?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘DIV min-height not adjusting to contents’ is closed to new replies.