Jump to content

Dynamic table width


kamal213

Recommended Posts

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.