Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

any way to make table cell size idependent?

Status
Not open for further replies.

leegold2

Technical User
Oct 10, 2004
116
Is there anyway to make ceel size in a table independent of the largest cell? eg. I want to to have a little cell "tab" on the left hand side of a big cell in a row to give the #number of the table row. But even though I just want to put a number - just a few chars in the cell, it swells vertically to the biggest cell in the row. Is there any way to make table cell size idependent? Thanks
 
The only way I can think of is have the large cells have colspan="2" in them, thus extending them over into the next cell.

--Chessbot

"See the TURTLE of enormous girth!"
-- Stephen King, The Dark Tower series
 
Code sample lee?

*cLFlaVA
----------------------------
Lois: "Peter, you're drunk!"
Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking!
 
Put an example of the code you are using. Colspan will work for a horizontal swell.
 
try this (i may be tatlly missing the point)
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td>1</td>
<td rowspan="2">sdfasdfasdf</td>
<td rowspan="2">asdfas</td>
<td rowspan="2">dfasdfas</td>
<td rowspan="2">dfasdfasdfasdf</td>
</tr>
<tr valign="top">
<td>&nbsp;</td>
</tr>
<tr valign="top">
<td>2</td>
<td rowspan="2">
<p>dfsdfsdfsdfasdf<br>
sdfsdfsdfsdfsdf </p>
</td>
<td rowspan="2">&nbsp;</td>
<td rowspan="2">&nbsp;</td>
<td rowspan="2">&nbsp;</td>
</tr>
<tr valign="top">
<td>&nbsp;</td>
</tr>
</table>
 
You could try <td valign="top">123</td> . This will display your row number at the top of the row.

... or have I missed the point completely ?

Cheers, Mike.
 
Here's a code sample, the only way to get this effect seems to be nesting tables. I'm not even sure of the identation to show nesting, but the effect is what I'm after.


<html>
<table border=0 cellpadding=0 cellspacing=0>
<tr valign=top>
<td>
<table border=0 cellpadding=0 cellspacing=0 nowrap valign=top>
<tr nowrap>
<table border=0 cellpadding=0 cellspacing=0<td>1. &nbsp; </td></table>
<td nowrap> Bakkenxvbvxvb<br>xcxvcxcxccvcv<br>cvcvcvcv<p>cvcvcvvcvc</td>
</tr>
</table>
</td>
</tr>
</table>
</html>
 
Why use tables at all? Why not use an ordered list, <ol>?

--Chessbot

"See the TURTLE of enormous girth!"
-- Stephen King, The Dark Tower series
 
Chessbot
That was what I thought too. Though I held back since I didn't know the exact circumstances and requirements.

If the "thing" you are making is a list, then use list tags. It's more logical.

If the list tags don't format how you want, then style/modify them using CSS.

- Web design and ranting
- Day of Defeat gaming community
"I'm making time
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top