Title: Need some css help with posts location
Last modified: August 19, 2016

---

# Need some css help with posts location

 *  [elizool99](https://wordpress.org/support/users/elizool99/)
 * (@elizool99)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/need-some-css-help-with-posts-location/)
 * i want t o put every 3 posts in one line
    i use table but how to do that every
   3 posts there will be closing tag </tr>(to open new line)? maybe something with
   css and not condition of php because i know the max width of evry posts (small
   posts)

Viewing 1 replies (of 1 total)

 *  [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * (@vtxyzzy)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/need-some-css-help-with-posts-location/#post-1446401)
 * Use code similar to this to put three posts on a row:
 *     ```
       $cell = 0;
       echo '<tr>';
       while (have_posts()) : the_post();
          if (++$cell > 3) {  // Have we already done 3 posts?
             echo '</tr><tr>';  // Yes, end the row and start a new one
             $cell = 1;
          }
          // rest of the loop
       <?php endwhile;
       echo '</tr>'; ?>
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘Need some css help with posts location’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * Last activity: [16 years, 1 month ago](https://wordpress.org/support/topic/need-some-css-help-with-posts-location/#post-1446401)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
