"Shmuel (Seymour J.) Metz" <spamtrap@library.lspace.org.invalid>
wrote:
[color=blue]
>I've got a document that StarOffice converted into HTML,[/color]
Hmm. I've never examined StarOffice generated code before. But this
doesn't bode well...
[color=blue]
>and I'm
>trying to clean up the cuft that it generated. I put together some
>basic styles, and tied using them: the results are puzzling. The style
>definition is:
>
> <STYLE>
> <!--
> @page { size: 8.5in 11in; margin: 0.79in }
> div.res dl dt {
> font-weight: bold;
> line-height: 3;
> text-decoration: underline; }
> div.res dl dd { font-size: medium; }
> div.res ul li { font: "Courier, serif"; }[/color]
This means use a font called 'Courier, serif'. I doubt that any sucj
font exists. A more normal definition would be
font-family: Courier, monospace;
as Courier is a monospaced font, not a serif one.
(Typographically speaking monospaced and serif aren't mutually
exclusive but in web terms the monospaced quality is usually more
important.)
Note that if you use the font shorthand you must specify the size as
well as the family.
http://www.w3.org/TR/CSS2/fonts.html#propdef-font
[color=blue]
> .lead {
> font-weight: bold;
> line-height: 3;
> text-decoration: underline;
> text-indent: 0; }
> .emp { font-weight: bolder; font-size: 1.2em; }
> -->
> </STYLE>[/color]
[color=blue]
>The StarOffice-generated HTML made extensive use of font tags, which I
>am trying to eliminate.[/color]
Bravo.
[color=blue]
> <div class=res>
>
> <p class="lead">
> RECENT EXPERIENCE:
> </p>
>
> <p>
> <span class="emp">name</span>,
> address (dates):
> </P>
>
> <UL TYPE=DISC>
> <LI>text</li>
> <LI><P ><FONT FACE="Courier, serif">text
> <LI><P ><FONT FACE="Courier, serif">text</FONT></P>
> <LI><P ><FONT FACE="Courier, serif">text</P>
> <LI><P ><FONT FACE="Courier, serif">text</FONT></P>
> <LI><P ><FONT FACE="Courier, serif">text</FONT></P>
> <LI><P ><FONT FACE="Courier, serif">text</FONT></P>
> </UL>
>
>Superficially it appear as though the text in the first li element
>should be rendered the same as the text in the other li elements, but
>it isn't.[/color]
Not rendered the same in what respect?
What happens when you correct the CSS syntax as outlined above?
[color=blue]
> Also, if I try to include either of
>
> font: "Courier, serif";
> font-family: "Courier, serif";
>
>in my definition of .emp, then it no longer renders in bold. Please
>advise.[/color]
Could be a number of things. I'd suggest fixing the syntax errors and
validating your code, then coming back and posting a URL if the
problem's still there.
BTW <span class="emp"> makes me think that the purpose is emphasis? In
that case <em> or <strong> would be more appropriate.
[color=blue]
>Note, this is not XHTML, so the missing ending tags (</font>, </p>)
>should be legitimate.[/color]
The end tag for font is not optional in HTML 4.
The end tag for p is optional in HTML 4.
When using CSS it helps to include all optional end tag as it limits
the number of browser bugs that can apply.
Steve
--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor
Steve Pugh <steve@pugh.net> <http://steve.pugh.net/>