HighDots Forums  

table font differs from body, why?

alt.html alt.html


Discuss table font differs from body, why? in the alt.html forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Frank
 
Posts: n/a

Default table font differs from body, why? - 10-06-2003 , 09:42 AM






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



Reply With Quote
  #2  
Old   
Toby A Inkster
 
Posts: n/a

Default Re: table font differs from body, why? - 10-06-2003 , 01:00 PM






Frank wrote:

Quote:
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



Reply With Quote
  #3  
Old   
DU
 
Posts: n/a

Default Re: table font differs from body, why? - 10-06-2003 , 02:00 PM



Frank wrote:

Quote:
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.


Quote:
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.


Quote:
/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...ef-family-name

Quote:
.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/doctorunc...e7Section.html



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.