![]() |
|
|
|||||||
![]() |
|
|
Thread Tools | Rate Thread |
|
|
PM User | #1 |
|
New Coder ![]() Join Date: Aug 2005
Posts: 80
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
word-wrap in firefox ?
I use the following div
<div id="topmenu" style="word-wrap: break-word; width: 600px; padding:12px;"> to display a large amount of text, this works perfectly within IE the lines are nicely wrapped if the exceed the width of the div. However Firefox doesn't seem to wrap it at all. Is there anything I can do so Firefox will wrap as well ? |
|
|
|
|
|
PM User | #4 |
|
Regular Coder ![]() Join Date: Nov 2004
Location: The Netherlands
Posts: 551
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
no... Maybe later, as it's a standard.
You can however, set you text-align to justify to get a nicer effect in FF.
__________________
CATdude about IE6: "All your box-model are belong to us" |
|
|
|
|
|
PM User | #5 | |
|
New Coder ![]() Join Date: Nov 2005
Location: Australia
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
Quote:
Code for FF and hack for IE! |
|
|
|
|
|
|
PM User | #6 |
|
New to the CF scene Join Date: Apr 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
You can try this...
pre{ white-space: pre; /* CSS2 */ white-space: -moz-pre-wrap; /* Mozilla */ white-space: -hp-pre-wrap; /* HP printers */ white-space: -o-pre-wrap; /* Opera 7 */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: pre-wrap; /* CSS 2.1 */ white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */ word-wrap: break-word; /* IE */ } {word-wrap:;} is an IE proprietary property, and not a part of css. firefox's handling is correct. Unfortunately, FF does not support a soft hyphen /. so that's not an option. You could possibly insert a hair or thin space,  / (check me on the numeric entity) and  / , respectively. Making {overflow: hidden;} would cut the overflow off, and {overflow: auto;} would cause the overflow to enable scrolling. |
|
|
|
|
|
PM User | #7 | |
|
Senior Coder ![]() Join Date: Jun 2002
Location: The Netherlands, Baarn, Ut.
Posts: 4,254
Thanks: 0
Thanked 0 Times in 0 Posts
![]() |
Soft hyphen
Quote:
|
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Rate This Thread | |
|
|