This forum is now read-only. Please use our new forums at discuss.codecademy.com.

CSS: An Overview Forum

View Course » View Exercise

1151 points
4f09a40850f2b4000101eab3_864296619
Submitted by
Calvin
over 4 years ago

I am doing exactly what it wants (at least I think so) but nothing happens!

Here is the html:

<!DOCTYPE html>
<html>
    <head>
        <link type="text/css" rel="stylesheet" href="stylesheet.css"/>
        <title>Result</title>
    </head>
    <body>
        <h3>Roses are red.</h3>
        <h2>Violets are blue!</h2>
    </body>
</html>

Here is the css:

h3 {
    color: #cc6666;
};

h2 {
    color: #8a2be2;
};

Just like it wants. But when I hit result, h3 is red, but h2 is adamantly remaining black. What am I doing wrong? Its supposed to be violet and it gives me the hex for that.


4 votes

Best answer

permalink

I think the problem is the semicolons after the } in the CSS. Remove them and see if that helps.

3117 points
Picture
Submitted by
Alex J
over 4 years ago

1 Comment

4f09a40850f2b4000101eab3_864296619 Calvin over 4 years ago

It worked! Thanks!


3 votes

permalink

h3 {
color:#cc6666
}

h2 {
color:#8a2be2
}

770 points
50c7156a61201be501002c7a_816852549
Submitted by
shail26
over 3 years ago


0 votes

permalink

Hmm. The computer seems to have decided not to paste the html like I wanted it to too.

1151 points
4f09a40850f2b4000101eab3_864296619
Submitted by
Calvin
over 4 years ago

1 Comment

Picture Alex J over 4 years ago

fixed that (see updated question)


0 votes

permalink

h3 {
color: #cc6666;
}

h2 {
color: #8a2be2;
}

344 points
D1b8bbe34b228a9c3d013760334e73ae?s=140&d=retro
Submitted by
Gregory A. Burdge
about 3 years ago


0 votes

permalink

h3 {
color: #cc6666;
}

h2 {
color: #8a2be2;
}

this is the css

125 points
06a7d05ef4557e4d9b2399650badb63d?s=140&d=retro
Submitted by
Rick McClelland
over 2 years ago


0 votes

permalink

Maybe it's the browser (IE) - changing to Chrome, cause I'm also having the same dilemma (h3{color:red;} will work just fine, but not the hex.

235 points
54e5574876b8fe73fa0008e7_132913895
Submitted by
Chris Bouril
over 2 years ago