Page 1 of 1
CSS font-size issues..
Posted: Fri Apr 09, 2004 6:44 pm
by Steveo31
Why isn't this working? I have a simple script for the body element of an HTML page:
Code: Select all
body {
font-family:arial;
font-size:90%;
padding:20px;
padding-left:7%;
padding-top:3%;
}
Everything works except for the font-size. I need it to apply to all text in the document, except when otherwise told to, like h4 or something. All the text is in tables, and if I put the font-size in the <td> CSS script, it works, but it also resizes <h4> and other varied-size-text.
Posted: Fri Apr 09, 2004 7:27 pm
by Unipus
In some browsers, upper-level font declarations do not cascade to include text in tables. I have no idea why, and yes, it's irritating. The simplest solution is to repeat your font-size declaration:
table {
font-size: 90%;
}
If you have further styles within the table, or in TDs, etc, they WILL then cascade normally from the TABLE declaration.
Extremely frustrating... td width
Posted: Sat Apr 10, 2004 12:21 am
by Steveo31
I'm ready to punch my freakin computer out. Simplest task in the world and it can't do it. I KNOW this is right:
Code: Select all
td.type {
padding:5px;
width:130px;
background-color:#F0F8FF;
font-size:12px;
}
td.output {
padding:5px;
width:130px;
background-color:#F0F8FF;
font-size:12px;
}
and the td....
Code: Select all
<tr>
<td class="type">Posted By:</td>
<td class="output"><?php echo $rowї'name']; ?></td>
</tr>
Doesn't work. The TD's end up being 50%.
Mozilla if that means anything.
Posted: Sat Apr 10, 2004 12:47 am
by phice
use .type instead of td.type
Posted: Sat Apr 10, 2004 2:00 am
by Steveo31
Fixed. Just some style and non-style conflicts.