• 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)
  • 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.