Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
317 views
in Technique[技术] by (71.8m points)

css - Word wrap not working in firefox, tried everything

Hello I'm so utterly confused and I've searched around here for hours and tried everything, yes including rules specific for FF.

Here is my current class.

.paste_body
{
float: left;
width: 100%;
margin-top: -30px;
margin-bottom: -10px;
word-wrap: break-word;
}

Before everyone goes on and starts giving me advice could you please take the time to real time CSS edit via inspect elm in fire fox to actually correctly answer this? because I've tried it all.

The URL is: skidpaste.org/QMGm3uOX

EDIT: Keep in mind this works in every other browser.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

This happens because Firefox doesn't know where to create a line break since you don't have any spaces in your text strings. Although I tried your page in Chrome, and it "works", it certainly doesn't look very good...

Here is a link on how to deal with this in CSS:

http://css-tricks.com/almanac/properties/w/word-break/


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...