kamal213 Posted December 2, 2011 Share Posted December 2, 2011 Hi guys, I have a table and with information on the <td> tag. The problem is some columns have large text and some have little but the size of all columns ends up being the same size as the column with the largest text. Is there a way to make it so the size of the columns depends on the size of the text. Thanks Link to comment https://forums.phpfreaks.com/topic/252320-dynamic-table-width/ Share on other sites More sharing options...
ManiacDan Posted December 2, 2011 Share Posted December 2, 2011 You're saying that this produces two columns that are the same width? <table> <tr> <td>safnwieuncv78923n7p48837oqnv8o3nijenvioulnvruionvoiuawneviuanewviouanweviouanweviouawenviouweavnuiwean</td> <td>abcd</td> </tr> </table> Link to comment https://forums.phpfreaks.com/topic/252320-dynamic-table-width/#findComment-1293507 Share on other sites More sharing options...
kamal213 Posted December 2, 2011 Author Share Posted December 2, 2011 This is my problem..below. <table> <tr> <td><p>safnwieuncv78923n</p> <p>7p48837oqnv8o3nijenvioulnvruionv</p> <p> oiuawneviuanewviouanweviouanweviouawenviouweavnui wean</p> </td> <td>abcd</td> </tr> </table> I would like abcd to be at the top same level as <p>safnwieuncv78923n</p> Not on the center of the page Link to comment https://forums.phpfreaks.com/topic/252320-dynamic-table-width/#findComment-1293513 Share on other sites More sharing options...
ManiacDan Posted December 2, 2011 Share Posted December 2, 2011 "Size" is ambiguous, you were talking about the height, and making things the same height is not what you want anyway. You need to simply alter the alignment of the cell. You're looking for the css vertical-align attribute. Link to comment https://forums.phpfreaks.com/topic/252320-dynamic-table-width/#findComment-1293520 Share on other sites More sharing options...
kamal213 Posted December 2, 2011 Author Share Posted December 2, 2011 Your a genius, Thats exactly wat am looking for! thanks for your help! Problem solved Link to comment https://forums.phpfreaks.com/topic/252320-dynamic-table-width/#findComment-1293525 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.