• Resolved esferapublica

    (@esferapublica)


    hey people,

    i have an emergency case here. we have a site that’s updated regularly because it’s an ongoing event for the next three weeks. But the layout is suddenly making kind of weird stuff and I can’t figure out why.

    We are using our own theme. LINK. If you scroll down the first site, you already can see the problem. After the second posts, all posts are outside of the content div.

    In a shortversion the indexfile looks like this.

    <div id="cont" class="top29">
    
     <div class="postarea">
        <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
        <div id="conthead">
    	  <div class="txthead">
    		<?php the_title(); ?>
    	  </div>
    	  <div>------------------------------------------------</div>
        </div>
    
        <div id="contbody" style="text-align:justify;">
        <?php the_content('mais...'); ?>
    	------------------------------------------------
        </div>
      </div>
    
      <?php endwhile; else: ?>
      <?php _e('Sorry, no posts matched your criteria.'); ?>
    
      <?php endif; ?>
    
      <?php posts_nav_link(' — ', __('&laquo; Older Posts'), __('Newer Posts &raquo;')); ?>
    
    </div> <!-- close cont -->

    The CSS class mentioned in the index files are here:

    body {
    	background-color: #fff;
    	font-family:    'CourierNewPSMT', 'Courier New', 'monospace';
    	font-size:      11px;
    	margin-top:     0px;
    	line-height:    16px;
    }
    #main
    {
    	position: 	relative;
    	width: 		570px;
    	vertical-align:	top;
    	margin-top: 	20px;
    	margin-left: 	auto;
    	margin-right: 	auto;
    }
    
    #cont
    {
    	position: 	relative;
    	float:		left;
    	margin-left: 	35px;
    	vertical-align:	top;
    	width: 		336px;
    	padding-bottom:	40px;
    }
    
    .top29
    {
    	margin-top:	29px;
    }
    
    .postarea
    {
    	margin-bottom:	25px;
    }
    
    #conthead
    {
    	position: 	relative;
    }
    
    #contbody
    {
    	position: 	relative;
    	line-height:	14px;
    	margin-top:	-3px;
    }
    
    .txthead
    {
    	font-weight: 	bold;
    	font-size:	12px;
    	text-align:	bottom;
    	padding-top:	7px;
    }

    My CSS-skills are basic, PHP-skills non existent.

    During debugging i saw that he just puts the first two posts into the “cont”-div. no matter how those first two or the last ones look like.

    I’m so clueless and a little bit in panic because the site has a very high visitor frequency during our event and it looks like shi*! i just made the update to 2.5 – but i don’t think that’s the problem. has anybody an idea????

    thanks in advance.
    karina

Viewing 5 replies - 1 through 5 (of 5 total)
  • I would say it has to do with the side bar maybe.

    What is the CSS for NAV, NAVHEAD and NAVBODY?

    Thread Starter esferapublica

    (@esferapublica)

    so, i just discovered one more thing which could help anybody out there to solve this maybe.

    he always puts the last/oldest post in the div one instance higher. that means if i post one more post, the oldest post is out of any div. so it’s probably a problem with this php-loop. could this be? unfortunately as mentioned above my php skills are level zero.

    so pleeease, any php-expert???
    thanks so much, karina

    Thread Starter esferapublica

    (@esferapublica)

    hey mrkingid;
    thanks for you’re answer!!

    the css for the divs you mentioned are like this:

    #nav
    {
    	position: 	relative;
    	float:		left;
    	vertical-align:	top;
    }
    
    #navhead
    {
    	position: 	relative;
    	width: 		196px;
    	height:		75px;
    }
    
    #navbody
    {
    	position: 	relative;
    	padding-top:18px;
    }
    Thread Starter esferapublica

    (@esferapublica)

    ok, i think i just solved…
    i closed the postarea div too early. i put the closing tag now under the <?php endif; ?> and it seems to work.

    congrats

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Emergency! Layout messed up.’ is closed to new replies.