Grow your CSS skills. Land your dream job.

[Solved] How to Align an Image with Text

  • # January 5, 2010 at 10:22 pm

    Hi,

    First of all, CSS tricks Rocks, I’ve learned a lot from the tutorials.

    Currently I’m working on this page:

    http://www.thereishope.ca/get-to-know-u … rs-welcome

    and I’m trying to get the signature image to align with the text to the left.

    Would appreciate some helpful answers.

    Thanks,

    Matt

    # January 5, 2010 at 11:49 pm

    Your problem is coming from this part of your CSS:

    Code:
    .article img, img.article {
    margin: 1em;
    }

    That 1em margin is going all around the image, causing it to not be flush.

    If you have access to the code directly, you can just change it FROM:

    <img width="115" height="48" style="float: left;" alt="Signature-Small" src="/images/stories/Signature-Small.png"/>

    TO:

    <img width="115" height="48" style="float: left; margin:0; padding:0;" alt="Signature-Small" src="/images/stories/Signature-Small.png"/>

    # January 8, 2010 at 5:15 pm

    Hi,

    Thanks a lot. I have implemented the code and think that it has solved the issue.

    Sorry I didn’t post the code example as I wasn’t sure what to post.

    Thanks again for the help.

    Matt

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".