Would you be able to use a purely CSS solution, rather than a javascript
one?

Something like:

http://www.scorpiontechnology.com/cobalt/floatbottom.htm

Simulates a float:bottom type of style.

JK

-----Original Message-----
From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Chris J. Lee
Sent: Monday, October 22, 2007 10:18 AM
To: jQuery (English)
Subject: [jQuery] Align to bottom (Div)


Trying to figure out a solid efficient algorithm for aligning objects
to the bottom. The div is a column and the height is dynamic because
the contents of the right column changes. (see below)

so say the markup for the image is this:
<div id="container">

<div id="col-left" class="alignstupidbottom">
   <img  src="blahblah.gif" />
</div>

<div id="col-right">
  <p>contents</p>
</div>

</div>

so in order to align say an image to the bottom you have to do this:

1. find the height of the container
2. find the height of the image
3. subtract height of container - height of image
4. set the position of the image with margin top.

correct? Is there a more efficient way?


Reply via email to