4. Rock your selectors


#1

/*Add your CSS below!*/
p { 
    color: #00E5EE;
}

div p{
    color: #CC0000;

* {
    border:1px solid #3A5FCD;
}

whats wrong with my code? it doesnt seem to work:(


#2

your div p css selector seems to be missing a closing curly bracket (}), ensure your browser zoom is set to 100% (ctrl + 0 or cmd + 0 for mac)


#3

omg thank you so much! i have finished the whole HTML course but was stuck on this page... how dumb of me...


#4

Hello, I need help here. What's wrong with my code?

/*Add your CSS below!*/
body {
color: #00E5EE;
}
div {
color: #CC0000;
}
* {
border: dotted; 2px; #3A5FCD;
}

I'm getting this message when I save and submit:

Oops, try again. Did you remember to add a border of color #3A5FCD around every element?


#5

border is a property with 3 values, which are seperated by spaces only:

border: width style color;

#6

Thank you! I'm now getting the message:

Congratulations, you've finished this section!


#7

Hello, is there something wrong with my coding? I think it's right but it keeps saying:
"Oops, try again. Did you remember to add a border of color #3A5FCD around every element? "
This is my code:
p
{color: #00E5EE;}
div p
{color:#CC0000;]
*
{border: 3px dashed #3A5FCD}


#8

your div p css selector gets closed with a square bracket, this should be a curly bracket


#10

Hello, having the same problem with my coding? I think it's right but it keeps saying:
"Oops, try again. Did you remember to add a border of color #3A5FCD around every element? "
Also had the same problem with lesson 2 of this section. Thanks
This is my code:

* {
    border: 2px solid #3A5FCD;
}
p {
    color: #00E5EE;
}
div p {
    color: #CC0000;
}

#11

Code is fine, maybe hit a glitch? Try a different browser


#12

Thanks I thought it was correct. I am using safari


#13

I'm getting an error message "Oops, try again. Did you remember to add a border of color #3A5FCD around every element?"

p
{
    color: #00e5ee;
    
}
div p
{
    color: #cc0000;
}

*
{
    border: 2px; #3a5fcd; solid;
}

#14

if you have a property which can have multiply values (For example border) you simple separate them by spaces:

border: width style color;

#15

Can I not do this?

border: #3a5fcd solid;
border: 2px;

#16

If you want on a single line then as @stetim94 said have a space between not semi colon
So:

border: 2px solid #3a5fcd;

If you want to have it separate then

border-width: 2px;
border-style: solid;
border-color: #3a5fcd;

#17

no, you can't. border needs 3 values, so in this line:

border: #3a5fcd solid;

it will come up with a default width (if i had to take a guess, 1 or 2 px), same for the line below:

border: 2px;

only one of three values, so it will come up with a default style (solid) and color (black) overwriting your border on the line above. Either give border 3 values, or use the individual property's like @zainabrawat showed