table font differs from body, why?

F

Frank

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);
}
}
 
T

Toby A Inkster

Frank said:
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.
 
D

DU

Frank said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top