? CSS replacing <img align="absmiddle">

M

mark | r

anyone know how this can be achieved in css?

i have an image e.g.

<img src="image.gif" width="20" height="40" align="absmiddle" alt="" />some
text

how can i align the text with the absolute middle of the image using only
css?

mark
 
S

Steve Pugh

mark | r said:
<img src="image.gif" width="20" height="40" align="absmiddle" alt="" />some
text

absmiddle is not a permitetd value of align in any standard version of
HTML. The permitted values are top, middle, bottom, left and right.
how can i align the text with the absolute middle of the image using only
css?

<p><img src="image.gif" width="20" height="40" style="vertical-align:
middle;" alt="" />some text</p>

From my experiments it looks like vertical-align: middle behaves more
like the non-standard align="absmiddle" than the standard
align="middle", so it seems to be exactly what you want. (Tested in
IE6, Opera 7.23 and Mozilla 1.5, note that in the last two
align="middle" and align="absmiddle" display the same anyway - only IE
clings to the old Netscape 2(?) display).

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,767
Messages
2,569,571
Members
45,045
Latest member
DRCM

Latest Threads

Top