Hello everybody.
I am working on a PHP program that shows some information in table cells..
However, the width of each cell is automatically widen (it becomes wider)..
How can I make the width of a cell fit to its content so that if it has 5 chars, then its width will fit to about only 5 chars, and so on and so forth.
Does anybody know?
This is an example:
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr><th>Name</th><th>Age</th><th>Marks</th></tr>
<tr><td>John Smith</td><td>36</td><td>98</td></tr>
<tr><td>Adam Smith</td><td>35</td><td>85</td></tr>
<tr><td>Essam Khaleel Adams</td><td>35</td><td>90</td></tr>
</table>
So, in this code, how can I make the width of the "Name" cell fit to its largest content (which is the last cell in my example)?Thanks in advance.