Click here to Skip to main content
15,889,802 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In firefox the word-wrap is not working??? Is there a way to tackle it???
Posted
Comments
krumia 5-Jul-12 1:50am    
If you are talking about CSS word-wrap property, AFAIK, it works on Firefox. Can you post your code here?
Arjun Menon U.K 5-Jul-12 2:10am    
div.PreTag{white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap ; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word }


This is the CSS class i'm using but the message being displayed is going beyond limit.. Its working fine in IE,chrome & Opera
Sergey Alexandrovich Kryukov 5-Jul-12 2:15am    
In what case did you see it?
--SA
Arjun Menon U.K 5-Jul-12 2:21am    
The content has a pre tag.. i am trying to show html contents in a div
Arjun Menon U.K 5-Jul-12 3:06am    
THis is the content

On 2012-07-03 17:07, test@drd.co.in wrote:
> Dear Admin
>
> This is in reference with your Request Ticket Number: RES_62
>
> * [1]
> * 2
> * [2]
> * [3]
>
> This is definitely weird.
> I simply downloaded a fresh copy of ccboard and used a fresh nbbc.php
> file. No changes.
> Then I thought, what the hell, and downloaded Dasamuka's nbbc.php,
> and
> you know what, it worked.
> Strange...
> Anyway, thank you a lot for support, and special thanks to Dasamuka.
> Regards
>
> * [4]
> * 2
> * [5]
> * [6]
>
> This is definitely weird.
> I simply downloaded a fresh copy of ccboard and used a fresh nbbc.php
> file. No changes.
> Then I thought, what the hell, and downloaded Dasamuka's nbbc.php,
> and
> you know what, it worked.
> Strange...
> Anyway, thank you a lot for support, and special thanks to Dasamuka.
> Regards
>
> * [7]
> * 2
> * [8]
> * [9]
>
> This is definitely weird.
> I simply downloaded a fresh copy of ccboard and used a fresh nbbc.php
> file. No changes.
> Then I thought, what the hell, and downloaded Dasamuka's nbbc.php,
> and
> you know what, it worked.
> Strange...
> Anyway, thank you a lot for support, and special thanks to Dasamuka.
> Regards
>
> Please reply back to this email without changing the subject line
> if
> you have further clarifications.
>
> DISCLAIMER:
> This email is confidential and intended solely for the use of the
> individual to whom it is addressed. Any views or opinions presented
> (including attachments) are solely those of the author and do not
> necessarily represent those of DRD. If you are not the intended
> recipient, be advised that you have received this email in error and
> that any use, dissemination, forwarding, printing, or copying of this
> email is strictly prohibited. If you have received this email in
> error, please contact the sender. Whilst every effort has been taken
> to ensure protection against virus infection, we cannot accept any
> responsibility for viruses. Consequently, please ensure that all
> attachments are virus checked prior to opening.
>
> Links:
> ------
> [1]
>
> http://codeclassic.org/community/view-postlist/forum-11-ccboard-support-forum/topic-1602-i-want-links-to-open-in-a-new-window/post-7098/postreport-1.html
> [2]
>
> http://codeclassic.org/component/ccboard/view-postlist/task-karmaDown/forum-11-ccboard-support-forum/topic-1602-i-want-links-to-open-in-a-new-window/post-7098/post_user-2723.html
> [3]
>
> http://codeclassic.org/component/ccboard/view-postlist/task-karmaUp/forum-11-ccboard-support-forum/topic-1602-i-want-links-to-open-in-a-new-window/post-7098/post_user-2723.html
> [4]
>
> http://codeclassic.org/community/view-postlist/forum-11-ccboard-support-forum/topic-1602-i-want-links-to-open-in-a-new-window/post-7098/postreport-1.html
> [5]
>
> http://codeclassic.org/component/ccboard/view-postlist/task-karmaDown/forum-11-ccboard-support-forum/topic-1602-i-want-links-to-open-in-a-new-window/post-7098/post_user-2723.html
> [6]
>
> http://codeclassic.org/component/ccboard/view-postlist/task-karmaUp/forum-11-ccboard-support-forum/topic-1602-i-want-links-to-open-in-a-new-window/post-7098/post_user-2723.html
> [7]
>
> http://codeclassic.org/community/view-postlist/forum-11-ccboard-support-forum/topic-1602-i-want-links-to-open-in-a-new-window/post-7098/postreport-1.html
> [8]
>
> http://codeclassic.org/component/ccboard/view-postlist/task-karmaDown/forum-11-ccboard-support-forum/topic-1602-i-want-links-to-open-in-a-new-window/post-7098/post_user-2723.html
> [9]
>
> http://codeclassic.org/component/ccboard/view-postlist/task-karmaUp/forum-11-ccboard-support-forum/topic-1602-i-want-links-to-open-in-a-new-window/post-7098/post_user-2723.html

Try out

word-wrap: break-word


it should work here is link of article talks about the same : http://hacks.mozilla.org/2009/06/word-wrap/[^]
 
Share this answer
 
v2
Comments
Arjun Menon U.K 5-Jul-12 2:24am    
Pranay i am using this the class below

div.PreTag
{
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word;
}

The contents i am trying to show has <pre> and html contents... ITs working fine in IE chrome and Opera but in FF the word-break is not working :(
Arjun Menon U.K 5-Jul-12 2:26am    
I gave the class for <div> is that the problem??
Firefox might be expecting a defined width in order to wrap it.

You need to use width and display properties together with word-wrap property:
CSS
width: 100px;
word-wrap: break-word;
display:inline-block;

Works both in IE & FF.

If you find this not working, use Firebug and see what CSS is being applied to the field you are trying to wrap. Check if the width & word-wrap properties are defined for it.
 
Share this answer
 
Comments
Arjun Menon U.K 5-Jul-12 2:15am    
div.PreTag{white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap ; /* Mozilla, since 1999 */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word }

I am using this CSS Sandeep.....
Sandeep Mewara 5-Jul-12 2:26am    
Oh! I was not sure if you were using CSS3.

If so, The word-wrap property is no longer part of the CSS3 specification. It’s been replaced by the overflow-wrap property.
Read: http://www.impressivewebs.com/word-wrap-css3/
Arjun Menon U.K 5-Jul-12 2:22am    
Its still not working... :(
Arjun Menon U.K 5-Jul-12 2:28am    
I gave the class for <div> is that the problem?
Sandeep Mewara 5-Jul-12 4:16am    
You have the sample in front of it, try out and see, difficult to comment. Use Firebug and see if that helps.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900