Previous Message
Next Message

How to vertically center img in div?

Sent by Steve Clay on 22 September 2004 13:01


Wednesday, September 22, 2004, 1:32:38 AM, Philippe Wittenbergh wrote:
PW> Explicitely specifying a font-family such as font-family:courrier,
PW> monospace; for the container, and then giving the container a font-size 
PW> equal to the height of the container seems more reliable [1].

Shouldn't that be Courier (one 'r' in the middle)?  Maybe just monospace is
the way to go...

PW> Not tested in IE Win yet.

Works fine IE5.5+/win.  In fact...

PW> <http://dev.l-c-n.com/misc/image_Center_V.php>
PW> [1] additionally, I gave the container a line-height of 100% - I don't
PW> think this should affect anything, in this case.

This removes the issue of having to guess at the font-size to give IE/win.
Seems obvious now :)  I'll make these changes on my page.

Steve
-- 
http://mrclay.org/ * http://frenchhorns.mrclay.org/

______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: