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

CSS: An Overview Forum

View Course » View Exercise

242 points
559278d4e39efef9bd000527_951796223
Submitted by
Daniel Liptrot
about 2 years ago

i have cheaked it so many times and it still wont work

I have tried every method I know and it still wont work so can someone tell me were about's I went wrong on this

h3 {
font-family: Verdana;
color: red
}

p {
font-family: Courier;
font-size: 16px
{

span{
background-color:yellow;
}


2 votes

permalink

Missing semicolons on the end of color:red and font-size:16px
Should look like
color: red;
font-size: 16px;

Also put a space here - background-color: yellow;

117 points
0d2186da598193bf7941dc9e5ef247fb?s=140&d=retro
Submitted by
Kevin Lin
about 2 years ago


0 votes

permalink

the last css property (of a css selector) doesn't need a semi-colon, this:

h3 {
font-family: Verdana;
color: red
}

p {
font-family: Courier;
font-size: 16px
{

span{
background-color:yellow;
}

and:

h3 {
font-family: Verdana;
color: red;
}

p {
font-family: Courier;
font-size: 16px;
{

span{
background-color:yellow;
}

are both perfectly valid, but as this guy describes here perfect, it is bad practice to leave out the semi-colon.

So, what is causing the error? your p css selector its closing curly bracket (}) is a opening curly bracket.

2822 points
593d545c83696644420003b7_64554016
Submitted by
stetim94
about 2 years ago