On 2008-10-12, Daniel Kaplan <NoSPam@NoSpam.comwrote:
Quote:
"Jim Moe" <jmm-list.AXSPAMGN@sohnen-moe.comwrote in message
news:5OidndAC-YJprG_VnZ2dnUVZ_tTinZ2d@giganews.com...
Quote:
>On 10/12/08 07:41 am, Daniel Kaplan wrote:
Quote:
>>Am making a picture class/container and running into a small problem. I
>>can't seem to align the image and/or text in the frame. [...]
>>>
> Align the text and image with what?
>
To the container. I simply would like to be able to put the image in the
container however I like. Maybe at the top, maybe centered, etc. I know I
can position the image in the container in an absolute fashion, so for
individual unique images I can set them (and the container borders) wherever
I wish .
>
Perhaps my question should have been... Are there "relative" alignment
properties so I can place an image in a container easily and with many
varieties?
Yes, but they might not be the varieties you want...
Vertical-align on inline elements is very difficult to understand, does
a lot of weird things, and not very many helpful things. It's not even a
very good way to do <suband <supbecause of the way that vertical
alignment affects line box height.
If you want a box with contents at the top, in the middle, or at the
bottom, you can make the box a table-cell and then use vertical-align on
the table-cell (not on the things inside it). That works in a fairly
intuitive way-- aligns the contents to the top, middle or bottom of the
box.