wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Paragraph rendered correctly in IE but not Firefox? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Paragraph rendered correctly in IE but not Firefox?" Watch "Paragraph rendered correctly in IE but not Firefox?" New topic
Author

Paragraph rendered correctly in IE but not Firefox?

C Brown
Greenhorn

Joined: Jun 24, 2009
Posts: 16

I'm using javascript to create a div that contains a paragraph which contains a long string. IE automatically wraps the contents, but Firefox displays the paragraph on one line. When I write it out in HTML it works in both browsers (like it should I assume because as far as I know the browser automatically wraps the contents of a paragraph). Is there something I'm missing when I use javascript? Thanks in advance.

Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Have you set the wrap css rules?

word-wrap

Eric
C Brown
Greenhorn

Joined: Jun 24, 2009
Posts: 16

I'm sorry, I guess the text I entered was not a good example of what the actually text is. The text contains spaces so it should automatically break at a space when needed... right?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60785
    
  65

Use Firebug to observe what's really getting created in the DOM. That might give you clues as to what's going on.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
C Brown
Greenhorn

Joined: Jun 24, 2009
Posts: 16

Thanks for your response, I have been using firebug and I think everything looks okay. I just created a test page that uses javascript to create the div and paragraph and everything works, so there must be something wrong with my code (the part that I didn't post).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Paragraph rendered correctly in IE but not Firefox?
 
Similar Threads
Replacing Element Body with jQuery.load(), What Happens To Old Elements?
How to eliminate the diffrence between firefox and ie about this problem
sending back JSON text to convert into a javascript array
Interfacing with SWF movie not working with firefox
table columns not sorted by Tablekit after AJAX call and <div> is added