By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,472 Members | 1,204 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,472 IT Pros & Developers. It's quick & easy.

wrap long line in html tables

P: 2
Hi,

Currently i am facing a problem
if my <td>***</td> contains value like

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
or
something is better than nothing and we all know that

then in both the scenarios if the size of the td is small to contain both the values
the wrap function should work and the output should be like
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaa
and

something is better than nothing
and we all know that

so for the second case the whole word should come to the next line.

I have tried the work-break property for keep-all , break-all, but they either supports the first or the second one but not both at a time

Is there any single property which breaks a line when it exceeds and also take cares that the whole word should go to the next line if word spacing exists in the same <td>
May 19 '08 #1
Share this Question
Share on Google+
3 Replies


Death Slaught
100+
P: 1,137
Please try and be more specific in your problem and provide better examples of what you're trying to accomplish.

Thanks,
{\_/}
(' . ')
(")[DEATH](")
(")(")
May 20 '08 #2

hsriat
Expert 100+
P: 1,654
This thread may help you.
May 25 '08 #3

P: 2
Hi, thanks for your comments
But i haven't got the solution.
The problem is i am working on a dynamic screen which depending on resolution the size of the screen will change as well as the size of the table that exists on the screen.
My code seem like
Expand|Select|Wrap|Line Numbers
  1. <div>
  2. <table>
  3. <td>
  4. contents
  5. </td>
  6. </table>
  7. </div>
now the content on <td> may be like

1. This is very good thing to take... --Words with space
2. ddddddddddddddddddddddddd --Words without space

There is a property in div called work-break where if you give the value as break-all then at the end of the line it breaks the line into a new line but my concern is

For the 1 scenario if the whole word unable to fit in the first line then the whole word should move to the next line

and for the 2 scenario after reaching the last point the next line should start.

Do you know any property where both the above scenario will work?

word-break: break-all - only second scenario satisfies
for the first scenario the whole word does not move to the next line

word-break:normal - only the first scenario satisfies
for the second scenario the non breakable line does not break after reaching the end of the td.
May 27 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.