File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Ranch Office and the fly likes Moe Zilla vs Code Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Ranch Office
Bookmark "Moe Zilla vs Code" Watch "Moe Zilla vs Code" New topic

Moe Zilla vs Code

Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
I'm running Mozilla FireFox 0.9.1. It doesn't always (or ever?) show code blocks in monofont. Same pages look perfect in IE. One time it was wrong and refresh made it right. Yikes.

Looking at page source I saw a blockquote around the code, I suppose to indent it nicely. The blockquote specifies a font. The preformatted section inside the blockquote specifies a font size but not a font. I guess the pre section is picking up the font of the blockquote?

Lemme know if you cannot duplicate. I can send screen shots or something. Thanks!!

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

I don't use Firefox, but I am running Mozilla 1.5 and 1.7 on various Linux machines, and the code sections render fine.

[Jess in Action][AskingGoodQuestions]
Jim Yingst

Joined: Jan 30, 2000
Posts: 18671
I've observed this same problem from both Mozilla (1.4-1.7) and Firefox (0.6-0.9) on Windows (2000 Pro and XP Home). IE and Opera consistently use monofont when in [code] tags, but Mozilla and Firefox sometimes revert to proportional font. I investigated a bit in the past, and the problem seemed to be due to the fact that in some situations, UBB generates invalid HTML for code tags. It tries to stretch a <font> tag across multiple blocks (e.g. paragraphs). I think. Don't really remember right now; I know I was going cross-eyed trying to sort ot all out, because sometimes the HTML is OK, and sometimes it's not. In the case of invalid HTML, Opera and IE interpret it one way, and Mozilla and Firefox interpret it another. That's my guess at least.
[ August 10, 2004: Message edited by: Jim Yingst ]

"I'm not back." - Bill Harding, Twister
I agree. Here's the link:
subject: Moe Zilla vs Code
jQuery in Action, 3rd edition