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> <>
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.

-- *

css-discuss [EMAIL-REMOVED]]
List wiki/FAQ --
Supported by --
Previous Message
Next Message

Message thread: