WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Using a two column blog post. (4 posts)

  1. alexjohnson
    Member
    Posted 8 years ago #

    What is the best way to have a blog post that has two columns - one containing the text on the left, and one containing pictures on the right? The pictures would be of a uniform width, but they would relate specifically to the article, i.e., a different set of three or four photographs for each post. This is for a travel blog that I'm setting up. Check out:

    http://www.meganlyles.com/quito-ecuador---behind-the-scenes-minutia

    for an example. I'm trying to mimic what she has going. (Thanks Megan).

    Thanks to anyone who can provide help.

  2. petit
    Member
    Posted 8 years ago #

    As the images will be tightly coupled with the post, the simplest way would be to include images with the post, and right align them. You would preferably do this using your stylesheet. Add a class to the images, say <img class="right-align" src="xxx,jpg" />.

    Then add to your stylesheet
    img.right-align{
    float:right;
    }

    Disclaimer: I haven't tested this for multiple images.

    meganlyles uses ordinary web pages, with a mix of tables and divs and some old fashioned clear gif distance blocks.
    This would be very hard to maintain in WP posts.

  3. ladydelaluna
    Member
    Posted 8 years ago #

    just to shorten up petit's code - i'd do this:

    to the stylesheet:

    .right {
    float:right;
    }

    .left {
    float:left;
    }

    then if you want the image (or anything else for that matter) to float right, you'd use:
    <img src="img.jpg" class="right" />
    and replace "right" with "left" for the reverse...

    using just "right" and "left" in the CSS makes it so that you can also apply the class to other elements like a certain line or paragraph.

    <p class="right">text you want aligned right

    i do something similar to this with text on my site at http://www.anubismarketing.com/

  4. alexjohnson
    Member
    Posted 8 years ago #

    Thanks. You guys are awesome. Consider this Q an A.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags