Sent by Jesper_Rønn-Jensen on 11 March 2006 16:04
Hope you can help me with this. I want to limit a table cell height to only
one line of text. My example below does not work - any height on td is
simply ignored if content is long.
Problem here (according to for instance
http://annevankesteren.nl/2004/01/css-tables ) is that CSS specification
requires table cell to expand to a minimum height of the containing
content.
So my question is: How is this solved in for instance GMail where content i
only one line high (and additional overflowing content is hidden). Please
share your thoughts on this, and if you could point me to any information on
how to solve this.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title></title>
<style type="text/css">
table{
width:300px;
border:1px dashed red;
}
td{
vertical-align: top;
background-color: #dfc;
height: 10px; /* table cell does not obey this height */
display: block;
}
</style>
</head>
<body>
<p>I want table row to be the height of 1 text line.</p>
<table>
<tr>
<td>1. start cell not much content</td>
<td>2. second cell has insanely long content that I know will always
wrap</td>
</tr>
</table>
</body>
</html>
Any help appreciated,
Jesper
--
Jesper Rønn-Jensen
Capgemini Danmark A/S
http://justaddwater.dk/ (weblog)
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt