5kyy8lu3 Posted December 15, 2008 Share Posted December 15, 2008 Ok here's the deal. I have a table with a white background color with 20px padding with a picture inside it so it looks like a polaroid. This works great and all except I have the "description" of the picture under the picture. This works fine until I have a picture with a long description saved to it. This stretches the table out to fit the text on one single long line. I can't "break" the test because it's a variable from my database so it's dynamic and changes per picture. I can't make a table for the description below the picture's table because then I have no way to get its width to match the top table since every picture is a different size. The only thing I can think of is to put a table WITHIN the picture's table to put the description into so the text breaks on its own affect the size of the table. If I set the nested table to height="*" width="*" will it conform to the table it's inside? or will this stretch both tables out to 100% of the screen size? here is the current code: <table cellpadding="0" cellspacing="0"> <tr> <td align="center" bgcolor="#FFFFFF"> <?php echo $_SESSION['logname'] . '_data/' . $_GET['pic'] . '">'; ?> <br> <br> <b> echo $row['description']; </b> </td> </tr> </table> in this screenshot you can see it working properly, the picture is framed with white and gives you that "polaroid picture" look in this picture i purposely put a really long description and look what happens, this is what I'm trying to fix thanks ahead of time, this is really giving me a headache Quote Link to comment https://forums.phpfreaks.com/topic/137005-do-nested-tables-with-percent-widthheights-conform-to-the-outter-table/ Share on other sites More sharing options...
5kyy8lu3 Posted December 15, 2008 Author Share Posted December 15, 2008 ok well I gave up for now and went a different direction, I left the picture in its own table and put the description below it in its own table, not as cool but it still works i guess, here's a screenie (i'd still love the solution to my problem if anyone has one) Quote Link to comment https://forums.phpfreaks.com/topic/137005-do-nested-tables-with-percent-widthheights-conform-to-the-outter-table/#findComment-715608 Share on other sites More sharing options...
ToonMariner Posted December 16, 2008 Share Posted December 16, 2008 why don't you learn about table-less layouts? despite what you may think they are fairly easy to get to grips with... I have said it before and will do so again... 'spending 2-3 days learning table-less (or css) layouts will be the most beneficial time you'll ever spend in web development'. Quote Link to comment https://forums.phpfreaks.com/topic/137005-do-nested-tables-with-percent-widthheights-conform-to-the-outter-table/#findComment-716373 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.