2

the p doesn't wrap within td, see the demo below:

http://fiddle.jshell.net/Grp2Q/

<td align="left" style="padding:0px; width:200px;">
      <img src="http://placehold.it/200x200" />
 </td>

 <td style="padding-left:20px;max-width:100%;">
  <p>dfgdfgggggggggggggggggggggdfgdfgdfsdsdfdfgdfgggggggggggggggggggggdfgdfgsdfsdsdfdfgdfgggggggggggggggggggggdfgdfgsdfsdsdf</p>
 </td>
4
  • formatting is always a good gesture mate!!! :) Commented Jan 6, 2014 at 7:32
  • Because you have no space in your string Commented Jan 6, 2014 at 7:33
  • @ManishJangirBlogaddition.com obviously he knows that, and that's why he is asking for solution Commented Jan 6, 2014 at 7:35
  • @ManishJangirBlogaddition.com : no its not necessary to have a space to break the string! Commented Jan 6, 2014 at 7:35

5 Answers 5

4

You need to break the text, to do that, make your table fixed width and than use word-wrap property with a value of break-word

Demo

table {
    table-layout: fixed; /* Make sure you use this as well */
    width: 100%;
}

td {
    word-wrap: break-word;
}
Sign up to request clarification or add additional context in comments.

Comments

0

use word-break:break-all

demo

<td style="padding-left:20px;max-width:100%;word-break:break-all;">
   <p>dfgdfgggggggggggggggggggggdfgdfgdfsdsdfdfgdfgggggggggggggggggggggdfgdfgsdfsdsdfdfgdfgggggggggggggggggggggdfgdfgsdfsdsdf</p>
</td>

1 Comment

@SurjithSM : yup...just link was not working..thanks for headsup!! :)
0

Add a style like this to your paragraph:

.word_wrap {word-wrap:break-word;} 

Comments

0

Try this code:

FIDDLE

CSS:

table {
    table-layout: fixed;
    width: 100%;
}

td {
    word-wrap: break-word;
}

4 Comments

This answer is already there dude. Try upvoting instead of creating new
@NoobEditor I do, but sometimes, may be happen in sametime
@NoobEditor I didn't post an answer to this because I saw your post just before submitting.
I didn't see the previous post , before i was submitting.sorry it won't happen in future..
0

Please add on css div table tr td{word-break: break-all;}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.