This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply 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: 15357
    
    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: 56202
    
  13

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


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About 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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Paragraph rendered correctly in IE but not Firefox?
 
Similar Threads
Replacing Element Body with jQuery.load(), What Happens To Old Elements?
sending back JSON text to convert into a javascript array
table columns not sorted by Tablekit after AJAX call and <div> is added
How to eliminate the diffrence between firefox and ie about this problem
Interfacing with SWF movie not working with firefox