NS 4.x CSS bug on PRE (was Re: [gst-devel] flow network terminology)

Tim 'Tool-Man' Taylor tim at tool-man.org
Sat Mar 31 01:31:09 CEST 2001


One quick workaround would be to change wiki-support/default.css to have:

@media all { /* XXX: NS4.x ignores @media */
     pre.code { margin-top: 8pt; } /* XXX: dummy selector for IE4 */
     pre.code {
         margin-top: 8pt;
         margin-bottom: 8pt;
         background-color: #E0E0E0;
         white-space: pre;
         border-style: none;
         border-width: thin;
         width: 100%;
     }
}

This will cause NS4.x to do the default rendering of PRE while less 
broken browsers render it with the appropriate styling.

Otherwise, here's the CSS I use on the JSFC sourcecode blocks:


pre.codeblock, pre.diagram {
	padding: .75em;
	margin: 1em 2em;
	font-family: "Courier New", Courier, Monaco, monospace;
	color: black;
	background: aqua;
}
pre.codeblock, pre.diagram { /* XXX: NS 4 */
	border: none;
	font-size: 1em; /* XXX: Linux NS 4 doesn't seem to obey this */
	white-space: pre;
}

You reported that it renders monospace in NS4.76 on Debian.  Erik 
replied privately that on two theoretically identical machines (RH7.0, 
NS4.76) one rendered it in monospace, the other in variable width.  You 
could try the following if you're willing to settle for 2 out of 3 :)  :

pre.code {
     margin-top: 8pt;
     margin-bottom: 8pt;
     background: #E0E0E0;
     font-family: "Courier New", Courier, Monaco, monospace;
}
pre.code { /* XXX: NS4.x */
     border: none;
     white-space: pre;
}

Which is my untested merger of the Wiki styles with the JSFC styles, so 
who knows what new CSS bugs will be flexed by the differences :/

Tim

David I. Lehn wrote:

> * Tim 'Tool-Man' Taylor <tim at tool-man.org> [20010329 21:28]:
> 
>> David (and Erik), can you give me your browser version and OS?  Be sure 
>> to specify which 'x' in Netscape 4.x if  you're running it.
>> 
>> I recall getting this exact same error in some version of NS4.x before 
>> when playing around with styles on PRE.  If we can narrow down the 
>> offending browser I'll see if I can fix it.  I'm running NS4.72 and it 
>> renders in monospace.
>> 
>> Also, does the source code in this page render in monospace in your browser:
>> 
>> <http://jsfc.sourceforge.net/>
>> 
> 
> netscape 4.76, latest debian unstable packages for x, fonts, ns, etc.
> 
> the jsfc source block looks fine.  and yes, i'm too lazy to figure it
> out based on this info ;)
> 
> -dave


-- 
Tim Taylor
tim at tool-man.org





More information about the gstreamer-devel mailing list