table font differs from body, why?

Discussion in 'HTML' started by Frank, Oct 6, 2003.

  1. Frank

    Frank Guest

    Hello,
    below the html file and the external style file. Html is fine, both body and
    table show courier as font.
    When I change body class to lettercour15, text outside the table changes but
    inside the table it is another font!??!
    Am I doing something wrong?
    Thanks
    Frank

    <LINK REL=StyleSheet HREF="vebrostijl.css" TYPE="text/css" MEDIA=screen>
    </head>
    <body class=lettercour>
    <img src="logo.gif"><br>
    dit is tekst buiten een table
    <p>dit is in een paragraaf</p>
    <table>
    <tr>
    <td width=20%>Aquagrond
    </td>
    <td>Een goed vullende sneldrogende grondverf voor binnen en buiten op basis
    van een waterverdunbare pu-alkydhars-combinatie
    </td>
    </tr>
    <tr>
    <td>Aqua UniPrimer
    </td>
    <td>Watergedragen hechtprimer voor ijzer/staal, zink, NE-metalen, Hard-PVC,
    snel drogend, voor binnen en buiten
    </td>
    </tr>
    </table>
    </body>



    Stylesheet contains:=======================

    {
    ..lettercour {font-family: courier new; font-size: 1em;}
    ..lettercour15 {font-family: courier new; font-size: 1.5em;}
    body {
    background-image: url(backg.gif);
    }
    }
     
    Frank, Oct 6, 2003
    #1
    1. Advertising

  2. Frank wrote:

    > When I change body class to lettercour15, text outside the table changes but
    > inside the table it is another font!??!


    Bug in Internet Explorer: tables don't inherit styles from the body.

    Workaround: explicitly style the table to match the body.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?id=132
     
    Toby A Inkster, Oct 6, 2003
    #2
    1. Advertising

  3. Frank

    DU Guest

    Frank wrote:

    > Hello,
    > below the html file and the external style file. Html is fine, both body and
    > table show courier as font.
    > When I change body class to lettercour15, text outside the table changes but
    > inside the table it is another font!??!


    As Toby answered, font are not inherited in tables in IE.


    > Am I doing something wrong?
    > Thanks
    > Frank
    >
    > <LINK REL=StyleSheet HREF="vebrostijl.css" TYPE="text/css" MEDIA=screen>
    > </head>
    > <body class=lettercour>
    > <img src="logo.gif"><br>
    > dit is tekst buiten een table
    > <p>dit is in een paragraaf</p>
    > <table>
    > <tr>
    > <td width=20%>Aquagrond



    Because you do not quote your attribute value here, the browser will
    interpret the width as 20 pixels, not as 20% of the table. In any case,
    you have not provided any width for the table, so I believe this
    attribute will be ignored.


    > </td>
    > <td>Een goed vullende sneldrogende grondverf voor binnen en buiten op basis
    > van een waterverdunbare pu-alkydhars-combinatie
    > </td>
    > </tr>
    > <tr>
    > <td>Aqua UniPrimer
    > </td>
    > <td>Watergedragen hechtprimer voor ijzer/staal, zink, NE-metalen, Hard-PVC,
    > snel drogend, voor binnen en buiten
    > </td>
    > </tr>
    > </table>
    > </body>
    >
    >
    >
    > Stylesheet contains:=======================
    >
    > {
    > .lettercour {font-family: courier new; font-size: 1em;}


    Here too: you must quote the font family name if it includes a blank space:

    .lettercour {font-family:"Courier New"; font-size: 1em;}

    " Font family names containing whitespace should be quoted. If quoting
    is omitted, any whitespace characters before and after the font name are
    ignored and any sequence of whitespace characters inside the font name
    is converted to a single space."
    http://www.w3.org/TR/CSS2/fonts.html#value-def-family-name

    > .lettercour15 {font-family: courier new; font-size: 1.5em;}
    > body {
    > background-image: url(backg.gif);
    > }
    > }
    >
    >


    DU
    --
    Javascript and Browser bugs:
    http://www10.brinkster.com/doctorunclear/
    - Resources, help and tips for Netscape 7.x users and Composer
    - Interactive demos on Popup windows, music (audio/midi) in Netscape 7.x
    http://www10.brinkster.com/doctorunclear/Netscape7/Netscape7Section.html
     
    DU, Oct 6, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joshua Beall
    Replies:
    14
    Views:
    13,497
    C A Upsdell
    Oct 30, 2003
  2. Mr. SweatyFinger

    why why why why why

    Mr. SweatyFinger, Nov 28, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    912
    Mark Rae
    Dec 21, 2006
  3. Mr. SweatyFinger
    Replies:
    2
    Views:
    2,003
    Smokey Grindel
    Dec 2, 2006
  4. Replies:
    3
    Views:
    313
    Ivan Vecerina
    Nov 7, 2006
  5. mttc
    Replies:
    2
    Views:
    2,408
    Roedy Green
    Jul 3, 2009
Loading...

Share This Page