Title: post border
Last modified: August 20, 2016

---

# post border

 *  [qlee46](https://wordpress.org/support/users/qlee46/)
 * (@qlee46)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/post-border/)
 * Hi,
 * I’ve build a loop to show dynamically three posts. Now I want that the left and
   the middle post are having a border. How can I programm that every left and middle
   post are having it.
    Someone an idea?
 * Thanks.

Viewing 1 replies (of 1 total)

 *  [Domino_ukraine](https://wordpress.org/support/users/domino_ukraine/)
 * (@domino_ukraine)
 * [14 years, 11 months ago](https://wordpress.org/support/topic/post-border/#post-2144141)
 * I can give an idea:
    before writing a post create a variable. For example, $tmp.
   Initially it is set to 1 (number of current post). in php code that displays 
   a post, write something like this:
 *     ```
       switch ($tmp) {
       case 1:
           {$border = "style='border:1px solid red;'";$tmp=2;}
       case 2:
           {$border = "style='border:1px solid red;'";$tmp=3;}
       case 3:
           {$border = "";$tmp=1;}
       }
       ```
   
 * And place $border into your post output.
    Must be work 🙂 At least two columns
   worked for me once 🙂

Viewing 1 replies (of 1 total)

The topic ‘post border’ is closed to new replies.

 * 1 reply
 * 2 participants
 * Last reply from: [Domino_ukraine](https://wordpress.org/support/users/domino_ukraine/)
 * Last activity: [14 years, 11 months ago](https://wordpress.org/support/topic/post-border/#post-2144141)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
