Help showing page of posts in 4 columns (4 posts)

  1. lewispaulsims
    Posted 4 years ago #

    I'm a noob to PHP and WP. Mostly an HTML/CSS guy. I've got a site set up more or less the way I need it but for one page. I have a page showing entire posts by a specific category, but I need to show them in four columns. I've got the first part, but as for the second part, the closest I have gotten is some CSS that looks messed up and probably won't work in IE. Any help?

    Here is the page in question:

  2. WPyogi
    Forum Moderator
    Posted 4 years ago #

    You might want to start with the mark-up errors:


    It also looks like there is a stylesheet missing the extension...using View Source shows it close to the top of the page.

  3. Michael
    Forum Moderator
    Posted 4 years ago #

    styling posts into columns is mainly a html/css issue;

    general approach: give each post div a fixed width, and a float:left - as you have done with your column inline styles (try to avoid inline styles, as they are much harder to debug with tools such as Firefox' web developer add-on);
    in the loop, add a clear:left to each first, fifth,... post div, possibly by adding a corresponding css class to the div;

    if you really want to dump the posts into columns, you need a special loop structure - for example see my post - but this is usually not necessary.

    you can paste the full code of your template into a pastebin and post the link to it here - HOW-TO - ad someone might be able to make some suggestions.

  4. lewispaulsims
    Posted 4 years ago #

    WPyogi, It would probably help if I didn't change the page before/while people are responding. Sorry, pretty sleepless here.

    alchymyth, thank you.

Topic Closed

This topic has been closed to new replies.

About this Topic