how to wrap a long text through css.

V

Victor

Hi all
i have a css question about how to wrap a long text by using css. for
example I have a very long text like
"ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
there is not white space and line break inside the text. how can I wrap this
text and make sure it can be used for most of the browser(IE, FF, sarafi).
and another thing, I thought about using js to control the text length for
each line. but in my website i need consider that user input perhaps is not
english. if i use js, how to handle the situation use input japanese chinese
etc.

Cheers
Victor
 
V

Victor

Hi Steven
I have tried this attribute. but it seems this one only worked in IE not
Firefox and safari. Is there anyway I can do this in those two browsers as
well?

Cheers
Victor
 
G

Guest

Hi Steven
I have tried this attribute. but it seems this one only worked in IE not
Firefox and safari. Is there anyway I can do this in those two browsers as
well?

Cheers
Victor

It's an IE-specific non-standard CSS property which works in IE only.
 
S

Steven Cheng[MSFT]

Hi Victor,

Yes, the word-wrap is a IE specific one. So far firefox seems hasn't
supported such a exact attribute for word/text wrap. Here is a web article
mentioned a workaround on this:

#FIREFOX / IE Word-Wrap, Word-Break, TABLES FIX
http://petesbloggerama.blogspot.com/2007/02/firefox-ie-word-wrap-word-break-
tables.html

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.
 
V

Victor

Hi Steven:
thanks for the reply. I tried to put the code into my page.. but seems it
still doesnt work for FF?

My code is
<div style="width:130px">
<table cellpadding="0" cellspacing="0" style="width:130px">
<tr>
<td class="HardBreak" style="width:130px">
<%=Comment%>
</td>
</tr>
</table>
</div>
the hardbreak class is the same as in the example. Do you have any idea why
this happened?

Thanks a lot
Victor
 
G

Guest

Hi Steven:
thanks for the reply. I tried to put the code into my page.. but seems it
still doesnt work for FF?

ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
is one word, and a white-space attribute will break the line after
this word.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top