Hi,
Fix the width of table and every column in numbering.
- <table width="500"></table>
-
<tr><td width="300"></td>
-
<td width="200"></td>
-
</tr>
-
</table>
so whenever first column data is exeed the width then it will be start from new line
Hi.
This will work 99% of the time, but if you have huge words, without spaces, most browsers will stretch the cell to fit the line.
Like for example:
-
<table border="1">
-
<tr>
-
<td width="10">
-
1234567890abcdefg...etc...
-
</td>
-
</tr>
-
</table>
-
If you try this HTML you will find that the cell far exceeds the 10px limit I set for it.
If you run into this problem, you should check out the
wordwrap PHP function.
(Works well with fonts like 'Courier New')
There is, unfortunately, no standard way to have the cell automatically wrap long words. We must resort to some sort of Javascript or server-side trickery to manage that.
The closes standard way to handle situations like these is the CSS overflow property, but it's usefulness is extremely limited.
P.S.
sandeepsandeep, please put your code inside [code] tags, and don't just put it in bold. It's much more readable that way.