• 14 Jan 2009 /  Web Design

    Basically, you have an image with text that is vertically aligned to the right of the image. I never found a solution on the internet, and this is what I came up with in my spare time poking around:

    1
    2
    3
    4
    
    <div>
    <div style="float: left;"><img src="./apple.png" alt="" /></div>
    <div style="text-align: left; line-height: 42px;">right text</div>
    </div>

    Short and sweet. It does not auto adjust to the image; so you’ll have to change line-height to your liking. This is similar to wordwrapping, but not quite.

    Finished example:

    Vert aligned text

    Tags: ,