Link to home
Start Free TrialLog in
Avatar of csgp_1412
csgp_1412

asked on

WordWrap/Overflow CSS solution

Hi,

I need a CSS class that can wrap spaceless (if at all the dictionaries permit!) lines nicely, without showing a horizontal scroll bar.

For example a line like this:
jhkjghjkhjhh.jkhksjhgjsdhgkh.gjksdhgjksdhgkh.gjksdhgkjhsdgkjhgdjshgsdhgdshgkhdsghdjshdjhgghjhgghdsgkjsdhgdshgjhgkjsdhgdshghdskjghdskjgh

floats across the screen when "overflow" attrib is not specified. If set to "scroll" the horizontal scroll bar appears. Is there a better solution?
Avatar of mudbuggle
mudbuggle
Flag of United States of America image

check out this:
http://www.css3.com/css-word-break/ (browser compatability is listed in the comments)

check out the example below: (I am attempting to find a solution for FF functionality)
<html>
<head>
<style>
div{
	width :100px;
	height : 100px;
	word-break : break-all;
	overflow : auto;
}
</style>
</head> 
<body>
	<div>fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff</div>
</div>
</body>
</html>

Open in new window

Avatar of csgp_1412
csgp_1412

ASKER

Well, FireFox is the one for which I need expert help :)
after a bit of research it appears the only solution appears to be javascript.
Ok. But how?
I am working on some code for you.
Oh. Thanks a lot. That'll be great.
ASKER CERTIFIED SOLUTION
Avatar of mudbuggle
mudbuggle
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks a lot, we will try this out.