Devine Posted August 20, 2007 Share Posted August 20, 2007 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? Quote Link to comment Share on other sites More sharing options...
php_tom Posted August 20, 2007 Share Posted August 20, 2007 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. Hope that helps. Quote Link to comment Share on other sites More sharing options...
Devine Posted August 20, 2007 Author Share Posted August 20, 2007 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. 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: Same code, but the second table on the left does not go 100%... but I want it to.. Quote Link to comment Share on other sites More sharing options...
php_tom Posted August 20, 2007 Share Posted August 20, 2007 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>. Quote Link to comment Share on other sites More sharing options...
Devine Posted August 21, 2007 Author Share Posted August 21, 2007 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) Quote Link to comment Share on other sites More sharing options...
AndyB Posted August 21, 2007 Share Posted August 21, 2007 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. Quote Link to comment Share on other sites More sharing options...
Devine Posted August 21, 2007 Author Share Posted August 21, 2007 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.. Quote Link to comment Share on other sites More sharing options...
Devine Posted August 22, 2007 Author Share Posted August 22, 2007 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? Quote Link to comment Share on other sites More sharing options...
Devine Posted August 24, 2007 Author Share Posted August 24, 2007 hello? Quote Link to comment Share on other sites More sharing options...
Devine Posted August 31, 2007 Author Share Posted August 31, 2007 hello?! duuuuuude!! Quote Link to comment Share on other sites More sharing options...
mosey Posted August 31, 2007 Share Posted August 31, 2007 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] Quote Link to comment Share on other sites More sharing options...
Xurion Posted September 2, 2007 Share Posted September 2, 2007 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. Quote Link to comment Share on other sites More sharing options...
Devine Posted September 4, 2007 Author Share Posted September 4, 2007 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? Quote Link to comment Share on other sites More sharing options...
Devine Posted September 4, 2007 Author Share Posted September 4, 2007 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". Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted September 4, 2007 Share Posted September 4, 2007 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. Quote Link to comment Share on other sites More sharing options...
mosey Posted September 5, 2007 Share Posted September 5, 2007 I guess ToonMariner has the best suggestion with controlling the table cell height using 'class' and css. However, I'd agree that it's not really feasible to define height as it'sa bit touch and go depending on the browser. Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted September 5, 2007 Share Posted September 5, 2007 teh best suggestion I had was to drop the tables all together Quote Link to comment Share on other sites More sharing options...
mosey Posted September 5, 2007 Share Posted September 5, 2007 LOL! Hehe ~ good point. Although, everyone starts with tables usually so perhaps Devine will make the leap alot faster^^ Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted September 6, 2007 Share Posted September 6, 2007 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 Quote Link to comment Share on other sites More sharing options...
Devine Posted September 6, 2007 Author Share Posted September 6, 2007 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. Quote Link to comment Share on other sites More sharing options...
Devine Posted September 10, 2007 Author Share Posted September 10, 2007 bump? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.