The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

my neverending Vertical Align text woes

I can never seem to fully grasp this concept. What I'm trying to do is

Code:

<div>
<img src="image.jpg" />
<p>some text</p>
<p>some text that may or may not be here</p>
</div>

I want the image to be on the left with the text on the right aligned vertically in the middle. If there's only one line, I want it to line up with the image. If there's two lines, I want it to continue to vertically align middle. I can align the text with margin/padding, but then it doesn't auto align when another <p> is added.

Liberty79, I posted a Quick Reply a few hours ago but it seems to have gone astray so I'll try again.

Seems you and I are in the same boat with that alignment problem. Been struggling with it for years. Finally, I've put what I know so far and what I am still trying to debug at xxxxxxxxxxxxx. Am hoping for replies from a couple of experts and if I learn more, I'll update that page.

Oh, nuts; I am not allowed to include a URL in my post until I've posted 10x.

I was looking through the OP's request last night. I suspected it was going to need some extra elements, two columns within a parent div. Paul your example is exactly as I envisioned what was needed to do this.