At 11:13 PM 4/3/2006, Samuel Richardson wrote:
Absolute positioning should position from the top/left of whatever
absolute element is containing it, usually this is the body.
A parent can have either absolute or relative positioning to provide
positional context for an absolute child.
Daniel Nitsche wrote:
I had a quick go, and this is what I came up with (assuming a
100x100px image):
<dl>
<dt>Product title</dt>
<dd>Product description - this can be as long as you like</dd>
<dd><img src="product-image.jpg" alt="product title"></dd>
</dl>
<style>
dl { position: relative; }
dl dt { margin-left: 110px; font-weight: bold; }
dl dd { margin-left: 110px; }
dl dd img { position: absolute; top: 0; left: 0; width: 100px;
height: 100px; }
</style>
What happens when you add a second item to the list? I believe the
images will overlay one another at the top of the list because
they're all being absolutely positioned in the context of the DL. Oops!
And to think, all this fuss just to avoid placing the image in the DT...
Paul
******************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************