Hello, I am having problem while using text inside td. I want to wrap up the text automatically when td's width is exceeded. How is it possible using html or css? Please help me if anybody is having answer of it. Thanks in advance.
should wrap automatically, but if not, try <td style="width:100px;"></td> Code (markup): Just change the 100px to whatever width you want, or use pt or em instead of px, whatever you prefer. Remember to make all the td's in the column the same width!
thanks for the reply friend.... I tried as you have said like this one... <table border="1" cellspacing="1" cellpadding="0"> <tr> <td style="width:1px">abcasdfhiosdahfdiofdhsaiodfhfioaxyzsdaohfsdiaofhiodsafshfiofhaioffhdasiofhfisdoafhadfidofhafiosdafhafiodhsafisoadfhdiofashd</td> </tr> </table> HTML: But it doesn't wrap my text. Please help me. Thanks.
It will not wrap as the text is in one sentence. if you keep some spaces in that sentence then it will wrap.
If your text has no spaces, some browsers will wrap the text and some other browsers will now wrap. What I suggest to do is to set a fixed width and to add style="overflow: hidden;". This will hide a part of the text, but it will not break the site layout.