WordPress.org

Ready to get started?Download WordPress

Forums

Break after each post. (3 posts)

  1. boneys
    Member
    Posted 3 months ago #

    Hello,

    I have created my own template and am able to list all the posts on the index page.

    I want to be able to have some space after each post. LIke a blank height of 5px. Also, say after 5 posts, i want to have a static post/div and continue to show remaining posts after that div. I created a class in css called blank5 => .blank5 {height:5px;} but it doesn't seem to work.

    My index.php :

    <div id="theposts">
    <?php while(have_posts()):the_post();?>
      <h2> <a>"><?php the_title()?> </a> </h2>
    	<?php the_content(__('Continue Reading'));?>
    
    <div class="blank5"> </div>
    <?php endwhile;?>
    </div>

    Please help. Thanks in advance.

  2. lorro
    Member
    Posted 2 months ago #

    Please post the page url to enable remote debugging with developer tools. Meanwhile, try setting property "min-height" instead of "height".

  3. boneys
    Member
    Posted 2 months ago #

    Thank you for your reply. Its on a localhost so i cannot post the url.

    I have a static background image and would like a gap of 5px after each post and the gap needs to be transparent. I added the following in the css and it works, but i want that to be transparent.

    .blank5 {height:5px; background-color:blue;}

    Note that I only want a height of 5px after the post and no height for the post.

    Any help appreciated. Thank you.

Reply

You must log in to post.

About this Topic