WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to align images horizontally using CSS (4 posts)

  1. ipatch
    Member
    Posted 2 years ago #

    Alright, I will try and make this brief. I recently created a blog post, and want to align the pictures horizontally on the page. I have been inserting the pictures using the following code:

    <a href="http://ipatch.penguinmilitia.net/wp-content/uploads/2011/09/hackintosh-01.jpg"><img src="http://ipatch.penguinmilitia.net/wp-content/uploads/2011/09/hackintosh-01-150x150.jpg" alt="" title="hackintosh 01" width="150" height="150" class="aligncenter size-thumbnail wp-image-1613" /></a>

    When I want to insert more than one image in a blog post, I usually want to tile the images horizontally.

    The current solution I have been doing is:

    <table>
    <tr>
    <td><img src="img1.jpg"></td>
    <td><img src="img2.jpg"></td>
    </tr>
    </table>

    So far the table solution has been working, but I am under the impression that I am not suppose to be using tables to design with, and that I am suppose to be using CSS. If I use CSS in a blog post can I create an internal style sheet to align the images?

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    Try using align:left when inserting your images. You should be able to get a few to line up horizontally that way. The exact number per row will depend upon the overall width of your content area.

  3. ipatch
    Member
    Posted 2 years ago #

    Try using align:left when inserting your images. You should be able to get a few to line up horizontally that way. The exact number per row will depend upon the overall width of your content area.

    The align:left seemed to do the trick. Thanks for the tip.

  4. fairfield_park_web_design
    Member
    Posted 2 years ago #

    align:left!important - something other style override these.

    regards
    Fairfield Web Design

Topic Closed

This topic has been closed to new replies.

About this Topic