At 4:51 PM -0500 2/8/11, Paul Burney wrote:

 It sounds like you need to set position: relative on the td element. That
 way, it will establish a system of coordinates for "absolutely" positioned
 elements inside it - i.e., they will be positioned relative to the upper
 left corner of the cell.

I believe this is correct, but if I recall correctly, relative
positions don't work reliably on table cells. If you find that to be
the case, you'll need to add a container div inside of the table cell,
set its width and height to 100%, and its position to relative.

Correct. The behavior of positioned table cells is undefined, so browsers get to do whatever they want, up to and including ignoring your declaration altogether. At least some do. If you explicitly set the cell to 'display: block' then most (but possibly not all) browsers will then honor 'position: relative' but the cell will no longer act as part of the overall table, which probably defeats the original intent. So, as Paul says, throw a div in there, gritting your teeth about the crufty markup if necessary, and relatively position the div. If you want to position in relation to the right or bottom edges of the cell, you may have to get creative with heights and widths and so on. If you only care about top and/or left, you can skip all that.

--
Eric A. Meyer (http://meyerweb.com/eric/), List Chaperone
"CSS is much too interesting and elegant to be not taken seriously."
  -- Martina Kosloff (http://mako4css.com/)
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to