Forums

[closed] Help needed with row setup. (4 posts)

  1. mfux
    Member
    Posted 9 months ago #

    Pastebin(PHP): http://pastebin.com/3qtezJjU
    Pastebin(CSS): http://pastebin.com/nn2TGeFL

    What I am trying to do is set up a row that handles posts, at the moment it is fine if there are only 2 posts, however, as soon as more are added then there is one post at the top, then a row with 2, then a 3rd row with just one post also.

    I want the code to make a new row once two posts have been put in to a row, then carry on in this manner while there are still posts.

    Thanks for any help!

  2. mfux
    Member
    Posted 9 months ago #

    Never mind, sorted it. Forgot that counters start at 0 thus my theme was putting 3 items in per row. Changed the 2 to a 1 in $post ==$posts[2] and all is fine.

  3. mfux
    Member
    Posted 9 months ago #

    Edit: It is not fixed, it is fine if I only display 4 posts on the index page however, 6+ and I get a set up of (row 1 first, number of posts); 2,1,1,2.

  4. mfux
    Member
    Posted 9 months ago #

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags