• Resolved mcdogs

    (@mcdogs)


    I have set up a site at http://www.bingoformen.com/. As you can see the front page is thrown all out depending on how many words I use in the first paragraph of each post. Is there any way of changing this so each box is a set size or even better changing it so instead of two rows I just have one row with the 6 most recent posts.

    This is the the main index code:

    <?php
    get_header();
    ?>
    
    <?php $count = 0;?>
    		<?php query_posts('showposts=6'); ?>
    	<?php if (have_posts()) : ?>
    
    <?php while (have_posts()) : the_post(); ?>
    
    <div class="postindex" id="post-<?php the_ID(); ?>">
    
    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    
    <div class="entry">
    <?php the_excerpt(__('Readmore �'));?>
    
    </div>
    <div class="spacer"></div>
    	<ul class="post-data">
    	<li class="comments">
    <?php comments_popup_link('No Comments &raquo;', '1 Comment &raquo;', '% Comments &raquo;'); ?>
    </li>
    	<li class="posted">
    <?php the_time('F jS, Y') ?> by <?php the_author() ?> <?php edit_post_link('Edit','',''); ?>
    </li>
    
    </ul>
    </div>
    
    <?php comments_template(); ?>
    					<?php
    					if($count == 1 ) {
    					echo "<div style='clear:both;'></div>";}
    					$count = $count+1;
    					?>
    
    <?php endwhile; else: ?>
    <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
    <?php endif; ?>
    
    <?php posts_nav_link(' — ', __('&laquo; Previous Page'), __('Next Page &raquo;')); ?>
    
    <?php get_footer(); ?>

    Any help greatly appreciated thanks.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Samuel B

    (@samboll)

    it’s frustrating as all hec to keep getting redirected to log in

    Thread Starter mcdogs

    (@mcdogs)

    Hmm you should not have to log in to see the site ?

    esmi

    (@esmi)

    Is there any way of changing this so each box is a set size or even better changing it so instead of two rows I just have one row with the 6 most recent posts.

    Welcome to the world of floated boxes/divs. The short answer is no.

    The long answer is that, even setting an absolute height on those boxes isn’t going to make any difference. You will never get them to line up exactly as browsers are designed to expand the height of the boxes to fit the text. So, as soon as you have 1 text character more in Box A compared to Box B, you end up with an imbalance.

    The best you can hope for is to “reset” the boxes after every second box using clear:left after every other box so that they line up in rows of 2 but even then, you can end up with an empty space because the left-hand box is longer than the right-hand one.

    esmi

    (@esmi)

    P.S: The best way around the problem is to shun this kind of floated box altogether if there is any chance that the content will be variable. A single column of boxes – each taking up most of the page width – would be the simplest way to deal with the problem.

    Thread Starter mcdogs

    (@mcdogs)

    Ideally that is what I want esmi, a single row of 6 boxes instead of two rows of 3, any ideas how I can go about this please?

    esmi

    (@esmi)

    A single row of boxes isn’t going to fit across that content area.

    Thread Starter mcdogs

    (@mcdogs)

    I do not want them in a row I want them one under the other so each one would be the full width of the content area.

    esmi

    (@esmi)

    Edit style.css (line 222)

    Replace:

    #content .postindex {
    	background:#DFDFDF url(images/postindex-bg.jpg) repeat-x scroll center top;
    	border:1px solid #636363;
    	float:left;
    	height:auto;
    	margin:0 6px 6px 0;
    	min-height:189px;
    	padding:0 8px;
    	width:316px;
    }

    With:

    #content .postindex {
    	background:#DFDFDF url(images/postindex-bg.jpg) repeat-x scroll center top;
    	border:1px solid #636363;
    	margin:1px auto 20px;
    	padding:0 8px 20px;
    	width:90%;
    }
    Thread Starter mcdogs

    (@mcdogs)

    Mate you are an absolute star, thank you so much.

    I need help editing a theme. I’m new to this so I had someone set it up for me, now I wanna do some more to the site. I like the theme that I am in, I just want to play with the colors and change some things around. Please help me.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Help editing a theme’ is closed to new replies.