[thelist] CSS problems
Chris Williams
cwilliams at UBmail.ubalt.edu
Tue Sep 19 13:03:01 CDT 2000
Tony,
There are a LOT of syntax problems with your style sheet. You cannot
declare fonts as you have in the example below:
.newsheading {font: bold 14pt Times New Roman, Times, serif;
text-decoration: none; color: #003366;}
Font properties have to be declared separately; there is no catch-all
"font" property. To achieve what you are after in the above declaration it
should be:
.newsheading
{font-family: "Times New Roman", Times, serif;
font-weight: bold;
font-size: 14pt;
text-decoration: none;
color: #003366;}
Font names that contain more than one word need to be placed in quotes in
order to be read properly. In this case, I'm not sure why you would
necessarily bother declaring those fonts as I believe they are the default
on most browsers, but if you're going to do it, that's the correct syntax
for it.
Also, you have created about 50 separate classes in your stylesheet--all
for the P tag--but in your HTML you reference them in your A and SPAN tags.
That's probably not going to give you the results you want. Finally, you
have throughout your stylesheet declared font sizes in both points and
pixels. This is not a very good idea, because browsers are not very good at
rendering font sizes predictably under the best of circumstances, and
giving them two separate units of measure which render very differently
from one browser/one platform to another is a recipe for a pretty
disastrous layout. If I were going to choose, I would recommend that you
use pixels, because they seem to circumvent the pesky differences between
PCs and Macs better.
I guess there's theoretically an article in this, but you can really find
information about style sheets everywhere. Hope this helps.
Chris Williams
More information about the thelist
mailing list