The best solution I found so far was:
http://jsfiddle.net/kizu/UUzE9/
But that wasn't quite it. You see, I have three columns; two of which need to avoid being explicitly sized. Well, the second one does need to be sized; but not quite.
Allow me to clarify by establishing the conditions I've been trying to meet.
- All three columns have fixed height: 65px, to be precise.
- The first column's width is set to 285px.
- The center column has no size defined; it simply takes up whatever space is left.
- The right column will size itself to whatever content is in there. There is no size explicitly set, it simply resizes based on content, leaving the center column to take up whatever space is left.
- There is no whitespace above, below, and in between each column.
The end result would roughly look something like this:
Logo | Player | Name
-----------------------------------------------------
For tables, I'd have simply done this:
<table width="100%" height="65px" cellspacing=0 cellpadding=0>
<tr>
<td width="285px" height="65px">
Logo
</td>
<td height="65px">
Player
</td>
<td width="1px" height="65px">
Account
</td>
</tr>
</table>
Result of above table code: http://jsfiddle.net/zMNYb/
But I'm trying to move away from using tables and using a DIV-based layout. Any ideas?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…