Jump to content

Td height help?


Devine

Recommended Posts

Ok, so I have this code:

 

			<tr>
				<td align='left' valign='top' width='25%' height='100%'>

					<table cellspacing='1' cellpadding='3' width='100%' class='window1' height='100%'>
					<tr>
						<td class='window2' class='small' height='100%' valign='top'>
							<font id='top'>
								<font class='bold'>Reverse Blade</font><br>
								Currently <b>status</b>.<br>
							</font>

						</td>
					</tr>
					</table>
				</td>
				<td width='3%'>
				</td>
				<td align='right' valign='top' width='72%' height='100%'>
					<table cellspacing='1' cellpadding='3' width='100%' class='window1' height='100%'>
					<tr>

						<td class='window2' height='100%'>
							<font id='top' width='95%'>
								 <b>mnc</b> <font class='small'> [ Thread Started August 17, 2007. ] </font>
							</font>
							<br><br>
							test<br>test<br>test<br>t<br>test<br>test<br>t<br>test<br>test<br>

						</td>
					</tr>
					</table>
				</td>
			</tr>

			<tr>
				<td height='10'>
				</td>
			</tr>

			<tr>
				<td align='left' valign='top' width='25%' height='100%'>
					<table cellspacing='1' cellpadding='3' width='100%' class='window1' height='100%'>
					<tr>
						<td class='window2' class='small' height='100%' valign='top'>
							<font id='top'>
								<font class='bold'>Reverse Blade</font><br>
								Currently <b>status</b>.<br>

							</font>
						</td>
					</tr>
					</table>
				</td>
				<td width='3%'>
				</td>
				<td align='right' valign='top' width='72%' height='100%'>
					<table cellspacing='1' cellpadding='3' width='100%' class='window1' height='100%'>

					<tr>
						<td class='window2' height='100%'>
							<font id='top' width='95%'>
								 <b>mnc</b> <font class='small'> [ Thread Started August 17, 2007. ] </font>
							</font>
							<br><br>
							test<br>test<br>test<br>t<br>test<br>test<br>t<br>test<br>test<br>

						</td>
					</tr>
					</table>
				</td>
			</tr>

			</table>
		</td>
	</tr>

 

Now, the second row (tr) decides to make it so that the table in the first td (in the second tr) would not be set to 100% of the tr's width.

 

 

help?

Link to comment
Share on other sites

It looks like your table is set to have three columns. So you need this code to make the second row span the entire table:

<tr>
<td height='10' colspan='3'>
</td>
</tr>

I'm sure there's a way to do it in CSS too, I just didn't feel like looking it up. ;D

 

Hope that helps.

Link to comment
Share on other sites

It looks like your table is set to have three columns. So you need this code to make the second row span the entire table:

<tr>
<td height='10' colspan='3'>
</td>
</tr>

I'm sure there's a way to do it in CSS too, I just didn't feel like looking it up. ;D

 

Hope that helps.

 

It adds the

<tr>
<td height='10' colspan='3'>
</td>
</tr>

every while statement.. so I really dont need the rowspan..

But that isnt the problem.... this is:

 

board-viewtopic.JPG

 

Same code, but the second table on the left does not go 100%... but I want it to..

Link to comment
Share on other sites

Oh, specify the height in the row (tr) not the column (td). Then it should make the heights the same. As in:

<tr>
<td height='10'>
</td>
</tr>

<tr height='100%'>
...

Typically you specify height in <tr> and width in <td>.

 

It doesnt need to be an attribute stated height, I want the table to the left (small one) to be the same size as the right side of it (larger one)

Link to comment
Share on other sites

http://www.w3.org/TR/REC-html40/struct/tables.html#edef-TR tr does not have a height attribute in the HTML standard

 

http://www.w3.org/TR/REC-html40/struct/tables.html#edef-TD td height is deprecated in the HTML standard.  You should allow the height of the cell to be governed by its content.

 

My god.. I want to find out WHY the table in the second tr isn't 100% height of the td that it's in.. As the one above it (with the same code) works perfectly.. but this one doesn't..

Link to comment
Share on other sites

ok so

 

#  Line 132, column 81: there is no attribute "HEIGHT"

… width='100%' class='window1' height='100%' id='p8'>

 

How can I make it so the table either allows the height attribute, or is there another way to make the table as high as the td it is in?

Link to comment
Share on other sites

I'm afraid I don't quite understand what you'reasking, but throwing the code into a page (and tidying it up) results in a screenshot like the attached. Would you mind using this to describe what the issue is? Thanks!

 

[attachment deleted by admin]

Link to comment
Share on other sites

The td to the left (profile table), is set to 100% height, which means it will be as high as the largest td in it's tr. (Meaning, the profile table will be the same height as the post table)

 

It works for the first table, but then it appears that it doesn't work for the second tr's tables. Any ideas? Maybe just change alittle bit of my code?

Link to comment
Share on other sites

Your original post seems to work in the way in which you decribe how you want it to work lol.

 

I uploaded your code to http://www.xurion.co.uk/table.htm. Check it and it works.

 

If you put "border='1'" for the profile tables, you will realise that your code still doesn't work. As I want the profile table that is IN the bordered td to be "100% height".

Link to comment
Share on other sites

this is going on for ever

 

you should let table cells do their own thing - don't restrict or force their width or height - especially in html.

 

us

 

td

{

width: 80%;

height: 5em;

}

 

obviously change it to your needs but only when ABSOLUTELY nessescary.

 

make sure your table does not have any ghost cells (particularly important if you use col/rowspan).

 

the VERY best thing to do would be to dump the table layout altogether and use divs and css - much much easier (look at how much trouble you are having now) and you will thoughrily enjoy the learning process.

Link to comment
Share on other sites

I don't understand why - I had to0 teach html and (it may just be my technique) those who listened said they found divs and css much easier to handle!!!1

 

I have no problem with using divs and css, it worked the same as the tables had. The first one was 100% in height, but the next was still the same size as the tables.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.