[thelist] vertical aligning a div contents with css
jon hall
jonhall at ozline.net
Thu Sep 26 17:30:07 CDT 2002
If you know the height of the text adjusting the the padding of the
sub-element holding the text will work.
<div style="height: 500px; width: 500px; position: absolute; background-color: #ffffff;">
<p style="padding-top: 400px">Lorem ipsum dolor sit amet</p>
</div>
--
jon
mailto:jonhall at ozline.net
Thursday, September 26, 2002, 5:14:07 PM, you wrote:
ED> I am trying to align the contents of a div to the bottom of it like so:
ED> +------------+
ED> | |
ED> | | <-- div
ED> | contents |
ED> +------------+
ED> The div has a specific height, and thus far, the text always appear on
ED> top. I have used vertical-align to no success.
ED> Am I missing something ?
ED> --
ED> thanks
More information about the thelist
mailing list