I need to create the following layout:
+--------+----------------------------------+-----------+
| fixed | variable | variable | fixed |
| width | width - p2 | width - p1 | width |
+--------+-------------------+--------------+-----------+
Where the two middle boxes, with their variable widths have the priority p1 > p2. The content in these two boxes will never result in two lines of text (vertically) as the p2 box will use elipsis when the text is too wide for the box.
More ascii art examples!
+--------+----------------------------------+-----------+
| <img/> | A person @ A Location |Today | Accept |
+--------+----------------------------------+-----------+
+--------+----------------------------------+-----------+
| <img/> | A person @ A Location w...|Today | Accept |
+--------+----------------------------------+-----------+
+--------+----------------------------------+-----------+
| <img/> | A person @ A ...|Yesterday @ 3pm | Accept |
+--------+----------------------------------+-----------+
So you'll see the "p2" box grows (there will be a maximum width) and the "p1" box shrinks to accomodate the width increase.
I really wish CSS permitted dimensions to be expressed as equations using jquery-esque traversal and css selectors! i.e.
.style {
width: $(this).parent.width - $('other_div).width ;
}
I am completely amenable to having this layout done in tables if it is easier to accomplish, i.e. if it requires less/no per-browser tweaking.
Cheers,
mike
UPDATE Ideally I'd like this to not require any javascript.