Another Newbie Q on CSS

A

Amadan

Hi. This piece of code perplexes me:

<style><!--
#content {
font-size: smaller;
}
--></style>
<table>
<tr>
<td id="content">
outer cell
<table>
<tr>
<td>
inner cell
</td>
</tr>
</table>
</td>
</tr>
</table>

Why is my "inner cell" unaffected by font-size?
And if I replace <table><tr><td> with <div>, everything's fine?

Thanks,

Goran
 
B

brucie

<style><!-- #content {font-size: smaller;} --></style>
<table>
<tr><td id="content">outer cell
<table><tr><td>inner cell</td></tr></table>
</td></tr>
</table>

Why is my "inner cell" unaffected by font-size?

browsers have problems with inheritance in tables. use redundant
selectors or specify a DTD to place the browsers into "strict mode"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 

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

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,279
Latest member
LaRoseDermaBottle

Latest Threads

Top