CSS Style Sheets

He has: 1,380 posts

Joined: Feb 2002

hi...i am having a problem with my stylesheets. for my H1 class, the font-color doesnt work! i dont think any of the font colors work, but most of the font colors are just black. heres the code:

body {background-color: #66FFFF;
       scrollbar-Track-Color:#CCCCCC;
       scrollbar-Face-Color:#FF9900;
       scrollbar-Shadow-Color:#4A1111;
       scrollbar-DarkShadow-Color:#000000;
       scrollbar-Highlight-Color:#923636;
       scrollbar-3dLight-Color:#CCCCCC;
       scrollbar-Arrow-Color:#FFFFCC}

p {font-family: Veranda, serif; font-size: 15;
font-color: "#000000"; background color: "#66FFFF"}
H1 {font-family: Veranda, serif; font-size: 20;
font-color: "#000000"; background color: "#FF9900"}
..menu {font-family: Veranda, serif; font-size: 17;
font-color: "#004D99"; background color: "#66B3FF"}
..section {font-family: Veranda, serif; font-size: 17;
font-color: "#000000"; background color: "#CCCCCC"}

img {float: left}


A:hover{color: #3366FF}
A:visited{color:#CC0000}
A{color: #333399}
H2.a:{font-family: Verdana}
H2.a:{font-size: 5}
'
if you find whats wrong, or any errors for that matter, please let me know. thanks!

mmi's picture

They have: 457 posts

Joined: Jan 2001

hmmm - you say

Quote: for my H1 class, the font-color doesnt work!

it looks like you've got it set to black - what color is displayed and what is your intent?


Web Xpertz Community Forums for Webmasters & Developers

Where You Can Learn, Advise, and Have Fun in the Process

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

there is no font-color.

just color.

bradsoft.com -- TopStyle for PC (comes with a validator)
westciv.com.au/stylemaster -- Style Master for PC and Mac (comes with a validator)
http://jigsaw.w3.org/css-validator/ (online CSS validator)

He has: 1,380 posts

Joined: Feb 2002

there is one that is supposed to be color...the H1.menu

mairving's picture

They have: 2,256 posts

Joined: Feb 2001

You should also remove the "" from around the color. Something like so:

<?php
H1
{font-family: Veranda, serif; font-size: 20;
color:#000000; background color:#FF9900}
?>

Mark Irving
I have a mind like a steel trap; it is rusty and illegal in 47 states

He has: 1,380 posts

Joined: Feb 2002

i'll trythat...thanks

He has: 1,380 posts

Joined: Feb 2002

i did it...it still doesnt work!

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Eskater, there is no thing called "font-color", the correct term is "color". And "background color" has to be "background-color", et cetera...

Generic classes have just one period -- .class. I don't know what you're trying to do with the H1.a: stuff, but that's not valid, either.

i.e.

p {
font-family: <strong>verdana</strong>, serif;  /* btw, verdana is sans-serif */
font-size: 15;  /* what units?! */
<strong><em>color</em></strong>: #000000;
background<strong>-</strong>color: #66FFFF;
}

H1 {
font-family: <strong>verdana</strong>, serif;
font-size: 20;   /* what units?! */
<strong><em>color</em></strong>: #000000;
background<strong>-</strong>color: #FF9900;
}

.menu {
font-family: <strong>verdana</strong>, serif;
font-size: 17;   /* what units?! */
<strong><em>color</em></strong>: #004D99;
background<strong>-</strong>color: #66B3FF;
}
'

Please check your work in the validators, they will help you figure this out.

They have: 238 posts

Joined: May 2002

The units that are available for size are

pixels: px
point: pt

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.