為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

word-wrap

more options

English: Hello, i am designing my webpage and can't beleave when i see that firefox doesn't support the css property word-wrap:break-word. It's a really problem cause the text doesn't wrap to divs and overflow it. I can use the property overflow but, don't like to use scroll bars I Hope you can help me with this problem. I am using Firefox 7

Español(Spanish): Hola, estoy diseñando una pagina web y no pude creer cuando vi que firefox no soporta la propiedad Word-Wrap:break-word. Esto es realmente un problema porque el texto no se ajusta a los contenedores, produce un overflow, podría utilizar la propiedad overflow pero no es lo que necesito porque no quiero que haya scroll bars, por ende el texto debería ajustarse y saltar a la linea de abajo en vez de estar contenido en una sola linea.


Espero que puedan ayudarme con este problema.

Utilizo la versión 7 de firefox

English: Hello, i am designing my webpage and can't beleave when i see that firefox doesn't support the css property word-wrap:break-word. It's a really problem cause the text doesn't wrap to divs and overflow it. I can use the property overflow but, don't like to use scroll bars I Hope you can help me with this problem. I am using Firefox 7 Español(Spanish): Hola, estoy diseñando una pagina web y no pude creer cuando vi que firefox no soporta la propiedad Word-Wrap:break-word. Esto es realmente un problema porque el texto no se ajusta a los contenedores, produce un overflow, podría utilizar la propiedad overflow pero no es lo que necesito porque no quiero que haya scroll bars, por ende el texto debería ajustarse y saltar a la linea de abajo en vez de estar contenido en una sola linea. Espero que puedan ayudarme con este problema. Utilizo la versión 7 de firefox

所有回覆 (8)

more options

It is supposed to work according to this page: https://developer.mozilla.org/en/CSS/word-wrap

Can you post a link to a page where it is not working?

more options

is an intranet page, but works on every other browsers, just with firefox doesn't

more options

Does the example page above work?

If the rule is in an external file, is the rest of the file being applied as expected?

If you open the Firefox error console (Ctrl+Shift+j), clear it, and reload the page, do any of the style warnings seem applicable to that rule (or the one right before it)?

more options

Is there any height set for that DIV container that might cause it?

more options

here is the code of my div

<div style="word-wrap:break-word; padding:0px 10px 0px 10px;font-size:12; overflow:auto;  white-space-collapse:collapse;" >

put all text in the same line, doesn't break it

edited by a moderator so that the code appears

由 cor-el 於 修改

more options

i guess i know when happen this, if i use "<pre>" tags have problem, if don't works fine, now my ask is why this appear only in firefox?

由 cor-el 於 修改

more options

< pre > tags

more options

The intended effect of the <pre> tag is to preserve the layout of your text exactly as typed. If you are not looking for that effect, there's no reason to use a <pre> tag.