Alternative for Firefox for style="word-break:break-all;"

style="word-break:break-all;"

works in IE and breaks a long line with no spaces. Is there an alternative for Firefox and Safari because it won't work in these browsers? Thanks.
wilcor14Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

lbertaccoCommented:
That's a microsoft extension, not supported by firefox. You can use javascript to generate the output and insert breaks
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
vidhubalaCommented:
i know its not working in firefox. i am looking for solutions?
0
micron98Commented:

<html>
<head>
<script language='javascript'>
//<![CDATA[
window.util = new Object();
window.util.wrap = function(e,v){
  if(( /msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent) )){
    e.style.wordBreak = "break-all";
    e.innerHTML = v;
  }else{
    e.innerHTML = v.split('').join('<wbr>');
  }
};
window.util.keyCode = function(e){
  return e.which || e.keyCode;
};
window.util.element = function(e){
  return e.target || e.srcElement;
};
function input_onkeyup(event){
 
  if(window.util.keyCode(event)!=13)
    return true;
  var table = document.getElementById('table');
  var tr = table.insertRow(0);
  var td = tr.insertCell(0);
  
  window.util.wrap(td,window.util.element(event).value);
}
//]]>
</script>
</head>
<body>
Input : <input onkeyup='return input_onkeyup(event)' size='80'>
Input text and hit enter.
<table id='table' width='300px' border='1'>
</table>
</body>
</html>

Open in new window

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Browsers

From novice to tech pro — start learning today.