4 Replies Latest reply on Dec 20, 2010 4:21 AM by NL_Derek-56V59O

    Font Size in tables

    NL_Derek-56V59O Level 1

      Greetings,

       

      Generating CHMs with RH 8.0.2.208 under Windows XP.

       

      I am trying to clean my CSS, so I removed the font-size line from the definition of "P", reasoning that it could be inherited from "BODY".

       

      This worked fine except in tables, where the font jumped from 10 to 12 points.In the WYSIWYG editor and the View (Ctrl-W) it displays correctly, only in the CHM it is wrong. The display of the HTM files is also good in Firefox and Internet Expolrer 7.

       

      I decompiled the CHM and peeped into the code. The differences between the original and decompiled topics were not great, so I tested them one-by-one.

       

      It turns out to be the header:


      <?xml version="1.0" encoding="utf-8" ?>
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml">


      ... which is good (displays in Verdana 10), while:


      <!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">

      <html>


      ... is bad (displays in Verdana 12).
      Oddly enough, no header at all (ie only the <html> entry) is also bad.

       

      I don't seem to be able to attach files, so here are what I think are the relevant parts of the CSS file:

       

      BODY {
          font-family: Verdana, sans-serif;
          font-size: 10pt;
          color: #000000;
          background-color: #ffffff;
      }

       

      P {
          margin-top: 5pt;
          margin-bottom: 0pt;
      }

       

      I have a workaround, which is to add font-size: 10pt; to the CSS, but does anyone know why this is happening?

       

      --- Derek