Stop table cell content from 'growing' the cell

P

Paul W

ok - I've got "Table-Layout:Fixed" working to stop the cells in a table from
growing when the text therein is large. However, this seems to NOT work as
soon as I need to use "Rowspan=2" for a cell (using IE 6).

It's really important to me that I can get this work, so I'd appreciate any
and all ideas.

Thanks,
Paul.
-----------------



<table border="1" bordercolor="#FF0000" style="table-layout:fixed;"
width=200 height=44>
<tr height=22><td rowspan=1 overflow="none">111<td rowspan=2 overflow="none"
style="overflow:none">big text comes here.big text comes here.big text comes
here.big text comes here.big text comes here.big text comes here.big text
comes here.big text comes here.big text comes here.</td></tr>
<tr height=22><td>333</td></tr>
</table>
 
C

Chris Leeds, MVP-FrontPage

if you could provide a link to the misbehaving page you will get a better
answer.

by growing, do you mean horizontally or vertically?

without knowing exactly what you mean, I'm thinking a .css style applied to
the cell where you spec the height and width and set the overflow property
to what you want, probably "hide".

HTH

--
Chris Leeds,
Microsoft MVP-FrontPage

ContentSeed: great tool for web masters,
a fantastic convenience for site owners.
http://contentseed.com/
 
M

Murray

You only get these options for overflow -

hidden | scroll | visible | auto

So your code would need to look like this -

<table border="1" bordercolor="#FF0000" width="200"><tr>
<td align="left" width="50%" valign="top">111</td>
<td rowspan="2" align="left" width="50%" valign="top"
style="overflow:hidden">big text comes here.big text comes here.big text
comes here.big text comes
here.big text comes here.big text comes here.big text comes here.big text
comes here.big text comes here.</td>
</tr><tr>
<td align="left" width="50%" valign="top">333</td>
</tr></table>

but - that would be weird. Generally, you cannot prevent a 'container' from
expanding as its contents expand.
 
S

Stefan B Rusynko

You get same effect w/ stds compliant html

<table border="1" bordercolor="#FF0000" width="200"><tr>
<td align="left" width="50%" valign="top">111</td>
<td rowspan="2" align="left" width="50%" valign="top">big text comes here.big text comes here.big text comes here.big text comes
here.big text comes here.big text comes here.big text comes here.big text comes here.big text comes here.</td>
</tr><tr>
<td align="left" width="50%" valign="top">333</td>
</tr></table>





| ok - I've got "Table-Layout:Fixed" working to stop the cells in a table from
| growing when the text therein is large. However, this seems to NOT work as
| soon as I need to use "Rowspan=2" for a cell (using IE 6).
|
| It's really important to me that I can get this work, so I'd appreciate any
| and all ideas.
|
| Thanks,
| Paul.
| -----------------
|
|
|
| <table border="1" bordercolor="#FF0000" style="table-layout:fixed;"
| width=200 height=44>
| <tr height=22><td rowspan=1 overflow="none">111<td rowspan=2 overflow="none"
| style="overflow:none">big text comes here.big text comes here.big text comes
| here.big text comes here.big text comes here.big text comes here.big text
| comes here.big text comes here.big text comes here.</td></tr>
| <tr height=22><td>333</td></tr>
| </table>
|
|
 
Top