One selector to rule them all: what is wrong with my code?


#1

Advice from ye wise ones welcomed!

This is the assignment:
use the universal selector to put a 1px dashed #3A5FCD border around every element on the page.

This is my code:
* {
border: 1px dashed #3A5FCD;
}

This is the message it gives me:
Oops, try again.
Did you remember to add a border of color #3A5FCD around every element?

What am I doing wrong?

nb: browser is Firefox, zoom is at 100%, just in case it matters.
:slightly_smiling:


#2

I did it in chrome and used a 3px (it says 2 or 3)
I think it was the px

(Put a border with the hex color #3A5FCD around every HTML element. It can be solid, dotted, dashed, 2px, 3px, whatever you like!)


#3

Tried that, didn't work. Also the assignment stipulates
"1px dashed #3A5FCD border"
so...

Any other ideas?


#4

Hello? Anyone? Anyone have any idea at all?


#5

Please paste in your full CSS


#6

*{
border: 1px;
border-color: #3A5FCD;

}


#7

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


#8

@centeno_karla_wizard, there are two ways to define a border:

border: width style color;

or:

border-width: width;
border-style: style;
border-color: color;

the values in this example are placeholder words, use actually value. You seemed to have used some sort of mixture. and (also for you @libbyonline) make sure your browser zoom is set to 100% (ctrl + 0 or cmd + 0 for mac)


#9

Tried
*{
border-width: 1px;
border-style: dashed;
border-color: #3A5FCD;
}

and
*{
border: 1px dashed #3A5FCD;
}

and browser set to 100%; not sure what else to do.


#10

You might have hit a glitch, do you see the border in the floating preview window? As a workaround for glitches, try a different browser


#11

Just did that -- switched browsers -- and it worked!!! So, YAY!! Thanks for your help all. :slightly_smiling: