Vertical align two divs, w/o using tables?

Giganews Newsgroups
Subject: Vertical align two divs, w/o using tables?
Posted by:  Michael Ramey (raterus@spam.org)
Date: Tue, 13 Apr 2004

Hi,

I've have two divs, that are laid out side-by-side.  (I'm floating the first
div to the left)  I need to set up css on these two divs so that the second
div is vertically aligned to the first one (in the middle).  How can I go
about doing this?, both divs contain textual elements and I won't easily
know the heights, so absolute positioning is out.  I've also tried using the
vertical-align selector to no avail.  I'm trying to find a way
without using an html table, because I know I can get it to work great with
those, but I'm trying to block that mentality right now, but if it is the
best way, please tell me!

Thanks,
--Michael

Replies