W3C home > Mailing lists > Public > www-style@w3.org > May 1999

CSS2 & the <TT> ,, </TT> font. It's not monospaced

From: Craig Carey <research@clear.net.nz>
Date: Wed, 19 May 1999 12:37:06 -0400 (EDT)
Message-ID: <3742E890.20D378D8@clear.net.nz>
To: www-style@w3.org


I wish to comment on the Cascading Style Sheet (Level 2)
 drafts.

I have a large page which lists public proxies and the
 page was too large.

It contained long lists, one of which started with something
 like this:

<OL>
<LI><TT>&nbsp;utl-122-13.library.utoronto.ca:8080:A [ 128.100.122.1</TT>
<LI><TT>&nbsp;198.133.36.98:80:A { IP1-&gt;HN-&gt;IP2:
cache.ican.net</TT>
<LI><TT>&nbsp;cf-ctva.ex-pressnet.com:8080:A [ 24.239.0.41</TT>
<LI><TT>&nbsp;proxy.sy1ns.att.net.au:3128:C:d [ 202.10.2.2</TT>


The &nbsp; were used because if space characters were used
 then the Symantec Visual Page editor would delete them.

It was considered important to be able copy text off the
 Netscape 4.51 browser for lines with line numbers above
 999 (no problem for 999 & below) without the space between
 the full stop at the end of the line number and the data
 in line, disappearing. Without that space then text copied
 might resemble:

    1000.proxy.sy1ns.att.net.au

I did not find a way to (1) have a CSS specification for the
 <OL> and the <LI>, and (2) have exactly identical output,
 and (3) have the HTML of the lists maximally brief.


This seems to get close to doing the job:

<STYLE TYPE="text/css">
<!--
OL.proxylist { paddingLeft : 1em; Font-Family : monospace; Color : red }
OL.proxylist LI { List-Style-Type : Decimal; }
-->
</STYLE>

</HEAD>

<BODY BACKGROUND="images/bg1.gif" TEXT="black" BGCOLOR="#FEFEFE"
 LINK="#0000CC" marginwidth="14" marginheight="9"
 leftmargin="14" topmargin="9">

<OL CLASS="proxylist">
<LI>utl-122-13.library.utoronto.ca:8080:A [ 128.100.122.1
<LI>198.133.36.98:80:A { IP1-&gt;HN-&gt;IP2: cache.ican.net
<LI>cf-ctva.ex-pressnet.com:8080:A [ 24.239.0.41
<LI>proxy.sy1ns.att.net.au:3128:C:d [ 202.10.2.2


I found Netscape 4.51 CSS to be useless.

(1) I did not find a way to insert a bigger space between the dot
 of the line number, and the 1st character of the line.
 I suppose the CSS drafts ignore what a mouse-drag Ctrl-C
 operation does.

(2) The major comment of this message.

My browser is configured to use the fixed width font
 Andale Mono. When I specified Font-Family : monospace,
 the lists displayed in a different font.
Maybe it is a Netscape problem. I have absolutely no idea
 what a CSS2 monospaced font really is. A fixed width font
 is the font I tell the browser to use in the "Appearance
 / Fonts / Fixed Width Font" font selector menu.

Netscape's scheme seems to me to be extremely successful:
 I specify *two* fonts, the browser uses just those two, 
 and the only pages that have fonts that display badly
 are those which specify the font (whether or not using
 CSS to do that).

Why is the phrase "fixed font" not in the CSS2 documentation.


I came to the conclusion that CSS1/2 is of no use, which
 I did not presume to be the case when I tried to use CSS
 to reduce the number of bytes in the page.

Not only does it seem very possible that the CSS
 "monospace" is something some badly defined it should be
 avoided, but it also mapped onto some font which I did not
 identify/recognize.

I can't image how CSS could ever be regarded as providing
 a superior alternative the Netscape's scheme of allowing
 a user to select two fonts (Verdana and 8=0s Andale Mono),
 and then using just those two fonts. I 

http://www.w3.org/TR/1998/PR-CSS2-19980324/text.html

 is not any ioprovement as far as I can tell, in the
 matter of allowing fixed width fonts to be specified.

Maybe your group might say in the specs that the monospace
 font must be the same font as the fixed width font.

CSS refers to the strike through and blink, but to the 
 <TT> ... </TT> tags.

The main point is : CSS2 can't (check that) emulate
 the <TT> font, so maybe another CSS tag is needed.








-- 



Craig Carey
Auckland, New Zealand

e-mail: research@clear.net.nz
Snooz metasearch:
   http://home.clear.net.nz/pages/research/info/snooz.htm
Received on Friday, 28 May 1999 09:20:39 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:53:59 GMT